forked from Ar0xA/USG-DNS-ADBLOCK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunonprovision.sh
25 lines (17 loc) · 861 Bytes
/
runonprovision.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/vbash
# This script is based on the ubnt community message at:
# https://community.ubnt.com/t5/UniFi-Routing-Switching/Deploying-USG-scripts-through-controller/td-p/2140097
#the following lines remove the runonprovision scheduled task
#do not modify below this line until 'end no edit'
readonly logFile="/var/log/runonprovision.log"
source /opt/vyatta/etc/functions/script-template
configure > ${logFile}
delete system task-scheduler task runonprovision >> ${logFile}
commit >> ${logFile}
save >> ${logFile}
#exit
#end no edit
/usr/bin/curl --silent -o /config/user-data/update-adblock-dnsmasq.sh https://raw.githubusercontent.com/jsamuel1/USG-DNS-ADBLOCK/master/update-adblock-dnsmasq.sh
sudo /bin/chmod a+x /config/user-data/update-adblock-dnsmasq.sh
sudo /config/user-data/update-adblock-dnsmasq.sh
crontab -l > /config/scripts/testworked.log