added an installer

This commit is contained in:
2024-01-07 01:55:41 +05:00
parent 170ae7cb94
commit f717768f13

23
installer.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
mkdir $HOME/.local/bin/webcam-barcode -p
cp -r scan.sh beep.mp3 $HOME/.local/bin/webcam-barcode/
touch $HOME/.config/systemd/user/webcam-barcode.service
echo "[Unit]
Description=Barcode Reader Service
[Service]
ExecStart=$HOME/.local/bin/webcam-barcode/scan.sh
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
" > HOME/.config/systemd/user/webcam-barcode.service
systemctl --user daemon-reload
systemctl --user enable --now webcam-barcode.service