Skip to content
Snippets Groups Projects
Commit b10df676 authored by Jedian's avatar Jedian
Browse files

Issue minicom/simmc#24: Service implementation


Signed-off-by: default avatarJedian Marcos Brambilla <jmb15@c3sl.ufpr.br>
parent 37cbef6c
No related branches found
No related tags found
1 merge request!6Issue minicom/simmc#24: Service implementation
Makefile 0 → 100644
all:
@echo "Run \"make install\" to install the daemon. (You may need root privileges)"
install:
@echo "Installing daemon."
@if [ ! -e ./gesacmonit.conf ]; then echo "Configuration file not found! (Perhaps you forgot to copy and change it?)\n$$\tcp gesacmonit.conf.example gesacmonit.conf"; false; fi
@cp ./daemon/gesacmonit.service /etc/systemd/system/
@mkdir -p /usr/local/bin/gesacmonit/
@mkdir -p /etc/gesacmonit/
@cp ./gesacmonit.conf /etc/gesacmonit/
@cp ./src/* /usr/local/bin/gesacmonit/
@touch /usr/local/bin/gesacmonit/gesacmonit.pid
@systemctl daemon-reload
@echo "Daemon installed."
uninstall:
@echo "Uninstalling daemon."
@rm -rf /usr/local/bin/gesacmonit
@rm -rf /etc/gesacmonit
@rm /etc/systemd/system/gesacmonit.service
@systemctl daemon-reload
@echo "Daemon uninstalled."
[Unit]
Description=gesacmonit script
After=network.target
[Service]
Environment=GESACMONIT_CONFIG=/etc/gesacmonit/gesacmonit.conf
Environment=GESACMONIT_PIDFILE=gesacmonit.pid
WorkingDirectory=/usr/local/bin/gesacmonit/
ExecStart=/usr/bin/python3 gesacmonit.py ${GESACMONIT_CONFIG} ${GESACMONIT_PIDFILE}
[Install]
WantedBy=multi-user.target
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment