Inital automatic setup of the AB service

This commit is contained in:
steel99xl 2023-12-24 14:28:01 -05:00
parent 5bb0c72b5d
commit d05bf0244f
2 changed files with 27 additions and 0 deletions

12
AB.service Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=Mac like automatic brightness as service
[Service]
Type=simple
Restart=no
RestartSec=1
ExecStart=/usr/local/bin/AutomaticBrightness.sh
[Install]
WantedBy=default.target

15
setup.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
echo "Setting up AutomaticBrightness.sh as a service..."
echo "Cloning AutomaticBrighness.sh..."
sudo cp AutomaticBrightness.sh /usr/local/bin/
echo "Cloning AB.service for systemD"
sudo cp AB.service /etc/systemd/system/
echo "Startin Service..."
sudo systemctl enable AB
sudo systemctl start AB