Служба для systemd. Пример для сервера с рутом. Не рекомендуется так делать. Меняйте пользователя и директорию
This commit is contained in:
parent
e47c0d35a9
commit
86dfc6a925
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=TG bot for remote server offline checking
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
user=root
|
||||
WorkingDirectory=/root/pyOfflineNotifyer
|
||||
ExecStart=/usr/bin/python3 /root/pyOfflineNotifyer/main.py
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue