From e41a3705a7f310b79ffe94a8ee947fff7a12d9c9 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 4 Jul 2022 17:14:30 +0200 Subject: [PATCH] Initial Commit --- autoPowerup.service | 8 ++++++++ set-wakeup | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 autoPowerup.service create mode 100755 set-wakeup 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;