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

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

(Различия между версиями)
Перейти к: навигация, поиск
(Новая страница: «BGBillingServer <source lang="bash">[Unit] Description=BGBilling Server daemon Requires=activemq.service After=activemq.service [Service] EnvironmentFile=/etc/conf.…»)
 
(8 промежуточных версий не показаны.)
Строка 1: Строка 1:
 +
Данные юниты используются в образах виртуальных машин.
 +
 +
Activemq
 +
Лучше воспользоватся установщиком https://docs.bitel.ru/pages/viewpage.action?pageId=43384848
 +
BGBillingServer
BGBillingServer
-
<source lang="bash">[Unit]
+
<source lang="bash">
-
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/BGBillingServer/script/bgcommonrc checkmysql
-
ExecStop=/opt/bgbilling/server.sh stop
+
ExecStart=/opt/BGBillingServer/server_start.sh
 +
ExecStop=/opt/BGBillingServer/server_stop.sh
[Install]
[Install]
WantedBy=multi-user.target</source>
WantedBy=multi-user.target</source>
-
activemq
+
BGScheduler
-
<source lang="bash">[Unit]
+
<source lang="bash">
-
Description=Messaging and Integration Patterns provider
+
[Unit]
 +
Description=BGScheduler 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/scheduler.sh -estart
 +
ExecStop=/opt/bgbilling/BGBillingServer/scheduler.sh -estop
 +
 
 +
[Install]
 +
WantedBy=multi-user.target</source>
 +
 
 +
BGData_loader
 +
<source lang="bash">
 +
[Unit]
 +
Description=BGData_loader Daemon
 +
After=network.target activemq.service
 +
Requires=activemq.service
 +
 +
[Service]
 +
Type=forking
 +
ExecStart=/opt/BGBillingServer/data_loader.sh -estart
 +
ExecStop=/opt/BGBillingServer/data_loader.sh -estop
 +
 +
[Install]
 +
WantedBy=multi-user.target</source>
 +
 
 +
BGInetAccess
 +
<source lang="bash">
 +
[Unit]
 +
Description=BGInetAccess Server Daemon
 +
After=network.target mysql.service activemq.service
 +
Requires=mysql.service activemq.service
 +
 +
[Service]
 +
Type=forking
 +
ExecStart=/opt/BGInetAccess/access_start.sh
 +
ExecStop=/opt/BGInetAccess/access_stop.sh
 +
 +
[Install]
 +
WantedBy=multi-user.target
 +
</source>
 +
 
 +
BGInetAccounting
 +
<source lang="bash">
 +
[Unit]
 +
Description=BGInetAccounting Server Daemon
 +
After=network.target mysql.service activemq.service
 +
Requires=mysql.service activemq.service
 +
 +
[Service]
 +
Type=forking
 +
ExecStart=/opt/BGInetAccounting/accounting_start.sh
 +
ExecStop=/opt/BGInetAccounting/accounting_stop.sh
 +
 +
[Install]
 +
WantedBy=multi-user.target
 +
</source>
 +
 
 +
BGCRM
 +
<source lang="bash">
 +
[Unit]
 +
Description=BGCRM 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/BGCRM/crm.sh start
 +
ExecStop=/opt/BGCRM/crm.sh stop
[Install]
[Install]
WantedBy=multi-user.target</source>
WantedBy=multi-user.target</source>

Текущая версия на 06:30, 25 июля 2019

Данные юниты используются в образах виртуальных машин.

Activemq Лучше воспользоватся установщиком https://docs.bitel.ru/pages/viewpage.action?pageId=43384848

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/server_start.sh
ExecStop=/opt/BGBillingServer/server_stop.sh
 
[Install]
WantedBy=multi-user.target

BGScheduler

[Unit]
Description=BGScheduler 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/scheduler.sh -estart
ExecStop=/opt/bgbilling/BGBillingServer/scheduler.sh -estop
 
[Install]
WantedBy=multi-user.target

BGData_loader

[Unit]
Description=BGData_loader Daemon
After=network.target activemq.service
Requires=activemq.service
 
[Service]
Type=forking
ExecStart=/opt/BGBillingServer/data_loader.sh -estart
ExecStop=/opt/BGBillingServer/data_loader.sh -estop
 
[Install]
WantedBy=multi-user.target

BGInetAccess

[Unit]
Description=BGInetAccess Server Daemon
After=network.target mysql.service activemq.service
Requires=mysql.service activemq.service
 
[Service]
Type=forking
ExecStart=/opt/BGInetAccess/access_start.sh
ExecStop=/opt/BGInetAccess/access_stop.sh
 
[Install]
WantedBy=multi-user.target

BGInetAccounting

[Unit]
Description=BGInetAccounting Server Daemon
After=network.target mysql.service activemq.service
Requires=mysql.service activemq.service
 
[Service]
Type=forking
ExecStart=/opt/BGInetAccounting/accounting_start.sh
ExecStop=/opt/BGInetAccounting/accounting_stop.sh
 
[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
Личные инструменты