Пример юнита для systemd
Материал из BiTel WiKi
(Различия между версиями)
Zavndw (Обсуждение | вклад) |
Zavndw (Обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
Данные юниты используются в образах виртуальных машин. | Данные юниты используются в образах виртуальных машин. | ||
BGBillingServer | BGBillingServer | ||
- | <source lang="bash"> | + | <source lang="bash"> |
[Unit] | [Unit] | ||
Description=BGBilling Server Daemon | Description=BGBilling Server Daemon | ||
Строка 17: | Строка 17: | ||
activemq | activemq | ||
- | <source lang="bash"> | + | <source lang="bash"> |
[Unit] | [Unit] | ||
Description=Apache ActiveMQ Daemon | Description=Apache ActiveMQ Daemon | ||
Строка 27: | Строка 27: | ||
ExecStart=/opt/activemq/apache-activemq-5.9.1/bin/linux-x86-64/activemq start | ExecStart=/opt/activemq/apache-activemq-5.9.1/bin/linux-x86-64/activemq start | ||
ExecStop=/opt/activemq/apache-activemq-5.9.1/bin/linux-x86-64/activemq stop | ExecStop=/opt/activemq/apache-activemq-5.9.1/bin/linux-x86-64/activemq stop | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target</source> | ||
+ | |||
+ | <source lang="bash"> | ||
+ | [Unit] | ||
+ | Description=BGBilling Server Daemon | ||
+ | After=network.target,mysql.service,activemq.service | ||
+ | Requires=mysql.service,activemq.service | ||
+ | |||
+ | [Service] | ||
+ | Type=forking | ||
+ | ExecStartPre=/opt/bgbilling/BGBillingServer/script/bgcommonrc checkmysql | ||
+ | ExecStart=/opt/bgbilling/BGBillingServer/script/bgbilling start | ||
+ | ExecStop=/opt/bgbilling/BGBillingServer/script/bgbilling stop | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target</source> | ||
+ | |||
+ | BGCRM | ||
+ | <source lang="bash"> | ||
+ | [Unit] | ||
+ | Description=BGCRM Daemon | ||
+ | After=network.target | ||
+ | Requires= | ||
+ | |||
+ | [Service] | ||
+ | Type=forking | ||
+ | ExecStart=/opt/BGCRM/crm.sh start | ||
+ | ExecStop=/opt/BGCRM/crm.sh stop | ||
[Install] | [Install] | ||
WantedBy=multi-user.target</source> | WantedBy=multi-user.target</source> |
Версия 13:43, 21 января 2016
Данные юниты используются в образах виртуальных машин. BGBillingServer
[Unit] Description=BGBilling Server Daemon After=network.target,mysql.service,activemq.service Requires=mysql.service,activemq.service [Service] Type=forking ExecStartPre=/opt/bgbilling/BGBillingServer/script/bgcommonrc checkmysql ExecStart=/opt/bgbilling/BGBillingServer/script/bgbilling start ExecStop=/opt/bgbilling/BGBillingServer/script/bgbilling stop [Install] WantedBy=multi-user.target
activemq
[Unit] Description=Apache ActiveMQ Daemon After=network.target Requires= [Service] Type=forking ExecStart=/opt/activemq/apache-activemq-5.9.1/bin/linux-x86-64/activemq start ExecStop=/opt/activemq/apache-activemq-5.9.1/bin/linux-x86-64/activemq stop [Install] WantedBy=multi-user.target
[Unit] Description=BGBilling Server Daemon After=network.target,mysql.service,activemq.service Requires=mysql.service,activemq.service [Service] Type=forking ExecStartPre=/opt/bgbilling/BGBillingServer/script/bgcommonrc checkmysql ExecStart=/opt/bgbilling/BGBillingServer/script/bgbilling start ExecStop=/opt/bgbilling/BGBillingServer/script/bgbilling stop [Install] WantedBy=multi-user.target
BGCRM
[Unit] Description=BGCRM Daemon After=network.target Requires= [Service] Type=forking ExecStart=/opt/BGCRM/crm.sh start ExecStop=/opt/BGCRM/crm.sh stop [Install] WantedBy=multi-user.target