superfans-gpu-controller/install_daemon.sh

30 lines
715 B
Bash
Raw Normal View History

2019-03-08 19:52:00 +00:00
#!/bin/sh
echo "Created '/etc/systemd/system/superfans-gpu-controller.service' service file"
echo "[Unit]
Description=GPU-based controller of SUPERMICRO server FANs
After=syslog.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=`pwd`
ExecStart=python `pwd`/superfans_gpu_controller.py
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/superfans-gpu-controller.service
echo "\n"
echo "Registering superfans-gpu-controller.service"
systemctl enable superfans-gpu-controller.service
systemctl daemon-reload
echo "Enabled start at system startup"
systemctl enable myservice
echo "Starting the service"
systemctl start superfans-gpu-controller