The start.sh and stop.sh scripts receive a set of arguments from openvpn when invoked from tunnelUp.sh and tunnelDown.sh. They are: * $1: network interface for the VPN (e.g. tun0) * $2: interface MTU (e.g. 1500) * $3: link MTU (e.g. 1570) * $4: local IP (e.g. 10.47.10.6) * $5: remote IP if TUN (e.g. 10.47.10.5), network mask if TAP * $6: "init" or "restart" This commit makes these arguments available in transmission-pre-start.sh, transmission-post-start.sh, transmission-pre-stop.sh and transmission-post-stop.sh.
20 lines
551 B
Bash
Executable File
20 lines
551 B
Bash
Executable File
#! /bin/sh
|
|
|
|
# If transmission-pre-stop.sh exists, run it
|
|
if [ -x /scripts/transmission-pre-stop.sh ]
|
|
then
|
|
echo "Executing /scripts/transmission-pre-stop.sh"
|
|
/scripts/transmission-pre-stop.sh "$*"
|
|
echo "/scripts/transmission-pre-stop.sh returned $?"
|
|
fi
|
|
|
|
kill $(pidof transmission-daemon)
|
|
|
|
# If transmission-post-stop.sh exists, run it
|
|
if [ -x /scripts/transmission-post-stop.sh ]
|
|
then
|
|
echo "Executing /scripts/transmission-post-stop.sh"
|
|
/scripts/transmission-post-stop.sh "$*"
|
|
echo "/scripts/transmission-post-stop.sh returned $?"
|
|
fi
|