Last active
March 21, 2019 10:00
-
-
Save nickfox-taterli/9ba3d4fe5741a334852f845425948c3e to your computer and use it in GitHub Desktop.
Powerboard service fuck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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