Make user services that are persistent

This commit is contained in:
2020-07-05 20:57:03 +00:00
parent f84ff4b2aa
commit d1d63c7a1d
4 changed files with 19 additions and 3 deletions

View File

@@ -1,9 +1,11 @@
[Unit]
Description=Launch minecraft server
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/home/ubuntu/minecraft/ensure_running.sh
[Install]
WantedBy=multi-user.target
WantedBy=default.target

View File

@@ -6,4 +6,4 @@ Type=oneshot
ExecStart=/bin/sh -c 'date -d "+1 hour" > /home/ubuntu/minecraft/live_until.txt'
[Install]
WantedBy=multi-user.target
WantedBy=default.target