Skip to content

Instantly share code, notes, and snippets.

@Pillar1989
Last active April 4, 2018 08:37
Show Gist options
  • Save Pillar1989/aa15ae2afa1843e3106fac45cbe9be99 to your computer and use it in GitHub Desktop.
Save Pillar1989/aa15ae2afa1843e3106fac45cbe9be99 to your computer and use it in GitHub Desktop.
pip install pixel-ring
echo "TZ='Asia/Shanghai'; export TZ" >> /etc/profile
echo "[Unit]" >> /lib/systemd/system/test.service
echo "Description=Simplified simple board service" >> /lib/systemd/system/test.service
echo "After=NetworkManager.service" >> /lib/systemd/system/test.service
echo " " >> /lib/systemd/system/test.service
echo "[Service]" >> /lib/systemd/system/test.service
echo "Type=simple" >> /lib/systemd/system/test.service
echo "User=root" >> /lib/systemd/system/test.service
echo "Group=root" >> /lib/systemd/system/test.service
echo "WorkingDirectory=/root/" >> /lib/systemd/system/test.service
echo "ExecStart=/usr/bin/python test.py" >> /lib/systemd/system/test.service
echo "StandardOutput=syslog" >> /lib/systemd/system/test.service
echo "StandardError=syslog" >> /lib/systemd/system/test.service
echo " " >> /lib/systemd/system/test.service
echo "[Install]" >> /lib/systemd/system/test.service
echo "WantedBy=multi-user.target" >> /lib/systemd/system/test.service
systemctl enable test.service
wget https://gist.githubusercontent.com/Pillar1989/0cb057973381747c132730e27cd2c76f/raw/5455c959d2b194e7e53fd4bd3c6ac6fad6b5e438/test.py
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment