Hello guys
I'm trying to run a script at boot on Ubuntu 22 OS that will check if the device is connected to the internet or not. If it isn't, the script will run the "armbian-config" command to open a system configuration screen and edit the network configuration, the script is running fine but i can't execute it to run automatically at boot.
i tried :
$ sudo nano /usr/share/check_network.sh
#!/bin/bash
ping -c 1 google.com
if [ $? -ne 0 ]; then
echo "configure your network" | bash -c "read; armbian-config"
fi
$ sudo nano /etc/lightdm/lightdm.conf
[Seat:*]
display-setup-script=/usr/share/check_network.sh
i also tried
$ sudo nano /usr/share/xgreeters/slick-greeter.desktop
Exec=/bin/bash /usr/share/check_network.sh
any idea would be appreciated..
Top comments (0)