mitigated restarting by having timer launch another service that just restarts the actual service
This commit is contained in:
parent
de26140978
commit
0b300cf5f4
@ -1,9 +1,9 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Runs the second ze server as user gameservers.
|
Description=Runs the ze server as user gameservers.
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=simple
|
||||||
User=gameservers
|
User=gameservers
|
||||||
Group=gameservers
|
Group=gameservers
|
||||||
Environment=PATH=/usr/lib/jvm/jdk-17/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:
|
Environment=PATH=/usr/lib/jvm/jdk-17/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Restarts ze server every odd night in month at 5:30
|
|
||||||
Requires=css_ze.service
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=*-*-1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 05:30:00
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
13
systemctl_launch_ze/css_ze_restart.service
Normal file
13
systemctl_launch_ze/css_ze_restart.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Restarts the ze servers systemctl service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
Environment=PATH=/usr/lib/jvm/jdk-17/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:
|
||||||
|
ExecStart=/usr/bin/bash -c 'systemctl restart css_ze.service'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
systemctl_launch_ze/css_ze_restart.timer
Normal file
9
systemctl_launch_ze/css_ze_restart.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Restarts the systemctl service for ze server every odd night in month at 5:30
|
||||||
|
Requires=css_ze_restart.service
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 05:30:00
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user