Rename petrified.dispatch to extra/petrified.dispatch

organizing extra files
This commit is contained in:
tengel 2014-11-22 11:04:27 -06:00
parent a72283cd3a
commit 0d49333460

37
extra/petrified.dispatch Normal file
View file

@ -0,0 +1,37 @@
#!/bin/bash
#
# This is a NetworkManager dispatcher hook for petrified. This file should
# be copied to /etc/NetworkManager/dispatcher.d/10-petrified and set to
# mode 0755, permissions root:root
# Arguments - see networkmanager(8)
INTERFACE=$1
STATUS=$2
# Command to run
PETCMD=/usr/bin/petrified
# Run any time a network status has changed, basically; this could be
# easily customized to use a particular config for an exact interface
# using the '-c <config>' parameter.
case "$STATUS" in
up)
${PETCMD}
;;
vpn-up)
${PETCMD}
;;
down)
${PETCMD}
;;
vpn-down)
${PETCMD}
;;
dhcp4-change)
${PETCMD}
;;
dhcp6-change)
${PETCMD}
;;
esac