diff --git a/autoPowerup.service b/autoPowerup.service new file mode 100644 index 0000000..215c9d7 --- /dev/null +++ b/autoPowerup.service @@ -0,0 +1,8 @@ +[Unit] +Description=Powers off the server when no tasks running + +[Service] +ExecStart=/usr/local/bin/set-wakeup + +[Install] +WantedBy=multi-user.target diff --git a/set-wakeup b/set-wakeup new file mode 100755 index 0000000..cbd325f --- /dev/null +++ b/set-wakeup @@ -0,0 +1,3 @@ +#!/bin/bash +rtcwake -m no -t$(date -d sunday03:58 +%s); +exit 0;