#!/bin/bash # Exit on any error set -e # Download the autoconnect script and set executable permissions curl -o /usr/local/bin/autoconnect "https://gist.github.com/sarkrui/6aaaaeee84607af4e5ae6668d22f47dd/raw/autoconnect" chmod +x /usr/local/bin/autoconnect # Download the systemd service and timer files curl -o /etc/systemd/system/autoconnect.service "https://gist.github.com/sarkrui/6aaaaeee84607af4e5ae6668d22f47dd/raw/autoconnect.service" curl -o /etc/systemd/system/autoconnect.timer "https://gist.github.com/sarkrui/6aaaaeee84607af4e5ae6668d22f47dd/raw/autoconnect.timer" # Reload systemd to recognize the new units systemctl daemon-reload # Enable and start the service systemctl enable autoconnect.service systemctl start autoconnect.service # Enable and start the timer systemctl enable autoconnect.timer systemctl start autoconnect.timer echo "Installation and setup completed successfully."