Пример юнита для systemd

Материал из BiTel WiKi

(Различия между версиями)
Перейти к: навигация, поиск
(Новая страница: «BGBillingServer <source lang="bash">[Unit] Description=BGBilling Server daemon Requires=activemq.service After=activemq.service [Service] EnvironmentFile=/etc/conf.…»)
Строка 1: Строка 1:
 +
Данные юниты используются в образах виртуальных машин.
BGBillingServer
BGBillingServer
<source lang="bash">[Unit]
<source lang="bash">[Unit]
-
Description=BGBilling Server daemon
+
[Unit]
-
Requires=activemq.service
+
Description=BGBilling Server Daemon
-
After=activemq.service
+
After=network.target,mysql.service,activemq.service
 +
Requires=mysql.service,activemq.service
[Service]
[Service]
-
EnvironmentFile=/etc/conf.d/bgbilling
 
Type=forking
Type=forking
-
ExecStart=/opt/bgbilling/server.sh start
+
ExecStartPre=/opt/bgbilling/BGBillingServer/script/bgcommonrc checkmysql
-
ExecStop=/opt/bgbilling/server.sh stop
+
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=Messaging and Integration Patterns provider
+
[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 >/dev/null 2>&1
+
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
Личные инструменты