Implement time to live to determine when to shutdown

This commit is contained in:
2020-07-04 22:36:21 +00:00
parent ac9aefd331
commit f84ff4b2aa
4 changed files with 44 additions and 29 deletions

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Let server live for 1h after initial boot
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'date -d "+1 hour" > /home/ubuntu/minecraft/live_until.txt'
[Install]
WantedBy=multi-user.target