Пример юнита для systemd
Материал из BiTel WiKi
(Различия между версиями)
Zavndw (Обсуждение | вклад) (Новая страница: «BGBillingServer <source lang="bash">[Unit] Description=BGBilling Server daemon Requires=activemq.service After=activemq.service [Service] EnvironmentFile=/etc/conf.…») |
Zavndw (Обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | Данные юниты используются в образах виртуальных машин. | ||
BGBillingServer | BGBillingServer | ||
<source lang="bash">[Unit] | <source lang="bash">[Unit] | ||
- | Description=BGBilling Server | + | [Unit] |
- | + | Description=BGBilling Server Daemon | |
- | + | After=network.target,mysql.service,activemq.service | |
+ | Requires=mysql.service,activemq.service | ||
[Service] | [Service] | ||
- | |||
Type=forking | Type=forking | ||
- | ExecStart=/opt/bgbilling/ | + | ExecStartPre=/opt/bgbilling/BGBillingServer/script/bgcommonrc checkmysql |
- | ExecStop=/opt/bgbilling/ | + | ExecStart=/opt/bgbilling/BGBillingServer/script/bgbilling start |
+ | ExecStop=/opt/bgbilling/BGBillingServer/script/bgbilling stop | ||
[Install] | [Install] | ||
Строка 16: | Строка 18: | ||
activemq | activemq | ||
<source lang="bash">[Unit] | <source lang="bash">[Unit] | ||
- | Description= | + | [Unit] |
+ | Description=Apache ActiveMQ Daemon | ||
After=network.target | After=network.target | ||
+ | Requires= | ||
[Service] | [Service] | ||
Type=forking | Type=forking | ||
- | ExecStart=/opt/activemq/bin/linux/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 | ||
[Install] | [Install] | ||
WantedBy=multi-user.target</source> | WantedBy=multi-user.target</source> |
Версия 14:04, 14 ноября 2015
Данные юниты используются в образах виртуальных машин. BGBillingServer
[Unit] [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] [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