Code cleanup
This commit is contained in:
17
1og/service.sh
Normal file
17
1og/service.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Generate systemd service file
|
||||
|
||||
FILE=/etc/systemd/system/buttond.service
|
||||
|
||||
cat > $FILE << EOF
|
||||
[Unit]
|
||||
Description = buttonctl
|
||||
|
||||
[Service]
|
||||
Type = simple
|
||||
ExecStart = /usr/bin/python3 $PWD/button.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=buttond.service
|
||||
EOF
|
Reference in New Issue
Block a user