Skip to content

Instantly share code, notes, and snippets.

@nickfox-taterli
Last active March 21, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickfox-taterli/9ba3d4fe5741a334852f845425948c3e to your computer and use it in GitHub Desktop.
Save nickfox-taterli/9ba3d4fe5741a334852f845425948c3e to your computer and use it in GitHub Desktop.
Powerboard service fuck
#!/bin/sh
# wget -qO- https://git.io/fjf12 | sh
# curl -Lso- https://git.io/fjf12 | sh
if [ $(id -u) -ne 0 ]; then
printf "Script must be run as root or sudo."
exit 1
fi
wget http://piboxy.com/test_tmp/powerboard_daemon -O /usr/bin/powerboard_daemon
chmod a+x /usr/bin/powerboard_daemon
cat <<EOF > /etc/systemd/system/powerboard.service
[Unit]
Descriptio=Powerboard service
Wants=network.target
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
User=pi
ExecStart=/usr/bin/powerboard_daemon &
EOF
systemctl enable powerboard.service
systemctl start powerboard.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment