diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | sudoers.d/picontrol | 1 |
3 files changed, 5 insertions, 6 deletions
@@ -2,6 +2,7 @@ .PHONY: install uninstall install : + install -Dm 600 "sudoers.d/picontrol" "/etc/sudoers.d/picontrol" install -Dm 644 "main.py" "/usr/share/eu.xengineering.picontrol/main.py" install -Dm 644 "picontrol.service" "/usr/lib/systemd/system/picontrol.service" install -Dm 644 "static/css/style.css" "/usr/share/eu.xengineering.picontrol/static/css/style.css" @@ -10,5 +11,6 @@ install : install -Dm 644 "templates/index.html" "/usr/share/eu.xengineering.picontrol/templates/index.html" uninstall : + rm -f /etc/sudoers.d/picontrol rm -f /usr/lib/systemd/system/picontrol.service rm -rf /usr/share/eu.xengineering.picontrol/ @@ -14,18 +14,14 @@ The code works but there is still documentation / automation missing. **Please cd into the repository to install/uninstall!** -### Installation +### How to install, start and enable ```bash sudo useradd -rUs /usr/bin/nologin picontrol sudo make install -``` - -### Activation -```bash sudo systemctl enable --now picontrol ``` -### How to uninstall +### How to remove ```bash sudo systemctl disable --now picontrol sudo make uninstall diff --git a/sudoers.d/picontrol b/sudoers.d/picontrol new file mode 100644 index 0000000..992545f --- /dev/null +++ b/sudoers.d/picontrol @@ -0,0 +1 @@ +picontrol ALL=NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff |