Project

General

Profile

« Previous | Next » 

Revision f41c9fd5

Added by Ermal Luçi over 15 years ago

ping_hosts.sh is no more in /etc. Remove some unneeded lines.

View differences:

conf.default/config.xml
723 723
			<who>root</who>
724 724
			<command>/usr/bin/nice -n20 /usr/local/bin/checkreload.sh</command>
725 725
		</item>
726
		<item>
727
			<minute>*/5</minute>
728
			<hour>*</hour>
729
			<mday>*</mday>
730
			<month>*</month>
731
			<wday>*</wday>
732
			<who>root</who>
733
			<command>/usr/bin/nice -n20 /etc/ping_hosts.sh</command>
734
		</item>
735 726
	</cron>
736 727
	<wol>
737 728
		<!--
etc/inc/vpn.inc
101 101

  
102 102
	mwexec("/sbin/ifconfig enc0 up");
103 103

  
104
	/* get the automatic /etc/ping_hosts.sh ready */
104
	/* get the automatic ping_hosts.sh ready */
105 105
	unlink_if_exists("{$g['vardb_path']}/ipsecpinghosts");
106 106
	touch("{$g['vardb_path']}/ipsecpinghosts");
107 107

  
usr/local/bin/ping_hosts.sh
76 76
		if [ "$PREVIOUSSTATUS" = "DOWN" ]; then
77 77
			# Service restored
78 78
			if [ "$SERVICERESTOREDSCRIPT" != "" ]; then
79
				echo "UP" > /var/db/pingstatus/$DSTIP
80 79
				echo "$DSTIP is UP, previous state was DOWN .. Running $SERVICERESTOREDSCRIPT"
81 80
				echo "$DSTIP is UP, previous state was DOWN .. Running $SERVICERESTOREDSCRIPT" | logger -p daemon.info -i -t PingMonitor
82 81
				sh -c $SERVICERESTOREDSCRIPT
......
89 88
		if [ "$PREVIOUSSTATUS" = "UP" ]; then
90 89
			# Service is down
91 90
			if [ "$FAILURESCRIPT" != "" ]; then
92
				echo "DOWN" > /var/db/pingstatus/$DSTIP
93 91
				echo "$DSTIP is DOWN, previous state was UP ..  Running $FAILURESCRIPT"
94 92
				echo "$DSTIP is DOWN, previous state was UP ..  Running $FAILURESCRIPT" | logger -p daemon.info -i -t PingMonitor
95 93
				sh -c $FAILURESCRIPT

Also available in: Unified diff