Last active
January 22, 2017 14:46
-
-
Save timilsinabishal/97d3c29d38098fa49887a387406e5703 to your computer and use it in GitHub Desktop.
Script to automate some task when the computer boots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set result ="" | |
function checkAp { | |
nmcli -f BSSID,ACTIVE,SSID dev wifi list | awk '$3 ~ /YIPL-*/ && $2 ~ /yes/ {print $2}' | |
return | |
} | |
function runScripts(){ | |
for i in $(find $1 -type f) | |
do | |
sh ./$i | |
done | |
} | |
result=$(checkAp) | |
if [[ $result == "yes" ]]; then | |
#now start required apps for office | |
hipchat4 & | |
runScripts ../yipl/startup | |
#start scripts from office startup folders | |
fi | |
#List of all required apps | |
google-chrome & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment