FW_LED_System_Monitor/install_as_service.sh

22 lines
437 B
Bash
Raw Normal View History

2024-08-17 21:13:02 +00:00
chmod +x run.sh
rm -f fwledmonitor.service || true
cat <<EOF >>./fwledmonitor.service
[Unit]
Description=Framework 16 LED System Monitor
After=network.service
[Service]
Type=simple
Restart=always
WorkingDirectory=$PWD
ExecStart=sh -c "'$PWD/run.sh'"
[Install]
WantedBy=default.target
EOF
sudo systemctl stop fwledmonitor
sudo cp fwledmonitor.service /lib/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable fwledmonitor