Skip to content

Instantly share code, notes, and snippets.

@gregoriomelo
Created February 10, 2025 13:00
Show Gist options
  • Save gregoriomelo/7c5bd1a86b5c120a84eee8958a52e5a8 to your computer and use it in GitHub Desktop.
Save gregoriomelo/7c5bd1a86b5c120a84eee8958a52e5a8 to your computer and use it in GitHub Desktop.
Turn on Mac Mini 2014 (running Ubuntu) after power outage
#!/bin/sh
### BEGIN INIT INFO
# Provides: always boot
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 1
# Short-Description: always boot
# Description: always boot
### END INIT INFO
set -e
PATH="/sbin:/bin"
setpci -s 00:1f.0 0xa4.b=0
exit 0

Under /etc/init.d/, create a file called always-boot. Then run the following commands:

sudo service always-boot start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment