Correcting the download URL. Also having it search for 'LibreWRT'
[librewrt/.git] / packages / xwrt / webif-fonheartbeat / ipkg / webif-fonheartbeat.postinst
1 #!/bin/sh
2 #
3 # Webif post-install script.
4 #
5
6 if [ ! -f /root/.ssh/known_hosts ]; then
7         echo "+ known_hosts not found, creating file"
8         touch /root/.ssh/known_hosts
9 fi
10 if [ "`cat /root/.ssh/known_hosts|grep download.fon.com`" = "" ]; then
11         echo "+ download.fon.com not found in known_hosts, adding download.fon.com"
12         echo "download.fon.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA0zJFtj5NtrVsj8+qG0dtPE8WpHHDpTXp5+d3vvtSS7Hx7vYHyrfN/8PBVrrYOgl4dySY65sGtq34EU04VN4a7xQHSKJBunDUSQ/2Xz+eyo53LCVeFy1zNRCmB6jrFlJQvl5yviLvXmMtOGxG8Z1dfu4qavfGtBxwtwxKPKuiyhs=" >> /root/.ssh/known_hosts
13 fi
14
15
16 if [ ! -f /etc/crontabs/root ]; then
17         echo "+ crontab 'root' not found, creating file"
18         touch /etc/crontabs/root
19         
20         echo "+ enabling cron"
21         /etc/init.d/cron enable
22 fi
23 if [ "`cat /etc/crontabs/root|grep fonheartbeat`" = "" ]; then
24
25         echo "+ no entry found in crontab, adding fonheartbeat"
26         echo "0,30 * * * *    /etc/init.d/fonheartbeat start" >> /etc/crontabs/root
27         
28         echo "+ restarting cron"
29         /etc/init.d/cron restart
30 fi