Пример юнита для systemd
Материал из BiTel WiKi
(Различия между версиями)
Zavndw (Обсуждение | вклад) |
Zavndw (Обсуждение | вклад) |
||
Строка 9: | Строка 9: | ||
[Service] | [Service] | ||
Type=forking | Type=forking | ||
- | ExecStartPre=/opt | + | ExecStartPre=/opt/BGBillingServer/script/bgcommonrc checkmysql |
- | ExecStart=/opt | + | ExecStart=/opt/BGBillingServer/script/bgbilling start |
- | ExecStop=/opt | + | ExecStop=/opt/BGBillingServer/script/bgbilling stop |
[Install] | [Install] |
Версия 13:47, 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/BGBillingServer/script/bgcommonrc checkmysql ExecStart=/opt/BGBillingServer/script/bgbilling start ExecStop=/opt/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