Subversion Repositories ALCASAR

Rev

Rev 1474 | Rev 1688 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1474 Rev 1500
Line 1... Line 1...
1
#!/bin/bash
1
http://blog.osdev.org/git/2014/02/13/using-git-on-a-synology-nas.html#!/bin/bash
2
# $Id: alcasar-watchdog.sh 1474 2014-11-03 22:55:09Z richard $
2
# $Id: alcasar-watchdog.sh 1500 2014-11-27 08:09:43Z richard $
3
 
3
 
4
# alcasar-watchdog.sh
4
# alcasar-watchdog.sh
5
# by Rexy
5
# by Rexy
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
# Ce script prévient les usagers de l'indisponibilité de l'accès Internet
7
# Ce script prévient les usagers de l'indisponibilité de l'accès Internet
Line 142... Line 142...
142
					fi
142
					fi
143
				fi
143
				fi
144
# disconnect users whose equipement is usurped (@MAC)
144
# disconnect users whose equipement is usurped (@MAC)
145
				if [[ $(expr $arp_reply) -gt 2 ]]
145
				if [[ $(expr $arp_reply) -gt 2 ]]
146
	       				then 
146
	       				then 
147
					echo "$(date "+[%x-%X] : ")alcasar-watchdog : $active_ip is usurped ($active_mac). Alcasar disconnect the user ($active_user)." >> /var/Save/logs/security/watchdog.log
147
					echo "$(date "+[%x-%X] : ")alcasar-watchdog : $active_ip is usurped ($active_mac). Alcasar disconnect the user ($active_user)." >> /var/Save/security/watchdog.log
148
					logger "alcasar-watchdog : $active_ip is usurped ($active_mac). Alcasar disconnect the user ($active_user)."
148
					logger "alcasar-watchdog : $active_ip is usurped ($active_mac). Alcasar disconnect the user ($active_user)."
149
					/usr/sbin/chilli_query logout $active_mac
149
					/usr/sbin/chilli_query logout $active_mac
150
					chmod 644 /var/Save/logs/security/watchdog.log
150
					chmod 644 /var/Save/security/watchdog.log
151
				fi
151
				fi
152
			fi
152
			fi
153
		done
153
		done
154
		;;
154
		;;
155
esac	
155
esac