cat <<EOF > /etc/systemd/system/wol.service
[Unit]
Description=Configure Wake On LAN
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp2s0 wol g
[Install]
WantedBy=basic.target
EOF
cat <<EOF > /etc/cron.d/run-schedule
# wakeup in 24 hours
0 4 * * * root echo `date '+%s' -d '+ 20 hours'` > /sys/class/rtc/rtc0/wakealarm; systemctl suspend
EOF
chmod +x /etc/cron.d/run-schedule
systemctl daemon-reload
systemctl enable wol.service
systemctl start wol.service
Last active
September 13, 2021 14:46
-
-
Save synchrone/d69ce6ad94336b64e872864adfe9c511 to your computer and use it in GitHub Desktop.
Proxmox settings
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment