diff --git a/AB.service b/AB.service new file mode 100644 index 0000000..d6aa319 --- /dev/null +++ b/AB.service @@ -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 diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..ab8ab0c --- /dev/null +++ b/setup.sh @@ -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 + + +