Пример юнита для systemd
Материал из BiTel WiKi
Версия от 06:28, 25 июля 2019; Zavndw (Обсуждение | вклад)
Данные юниты используются в образах виртуальных машин.
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
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