[ -f @initconfig@ ] && . @initconfig@
: ${prefix=@prefix@} ${exec_prefix=@exec_prefix@}
: ${bindir=@bindir@} ${sbindir=@sbindir@}
-: ${TRIPEDIR=@configdir@} ${tripesock=@socketdir@/tripesock}
+: ${TRIPEDIR=@configdir@} ${TRIPESOCK=@socketdir@/tripesock}
: ${pidfile=@pidfile@}
: ${tripe=$sbindir/tripe} ${tripectl=$bindir/tripectl}
PATH=/usr/bin:/usr/sbin:/bin:/sbin:$bindir
-export PATH TRIPEDIR
+export PATH TRIPEDIR TRIPESOCK
# --- Give up if there's no key ---
linux)
case `uname -s` in
Linux)
- if { test -f /proc/misc && grep -q net/tun /proc/misc; } ||
+ if { test -f /proc/misc && grep -q tun /proc/misc; } ||
modprobe -q tun; then
: good
else
fi
;;
esac
-
+
# --- Do what was wanted ---
case "$1" in
${keytag+-S-t}$keytag \
${addr+-S-b}$addr \
${port+-S-p}${port} \
- ${user+-S-u}${user} \
- ${group+-S-g}${group} \
+ ${user+-U}${user} \
+ ${group+-G}${group} \
${trace+-S-T}${trace} \
${tunnel+-S-n}${tunnel} \
${miscopts}
[ -x $i ] || continue
name=`basename $i`
case $name in *~|\#*) continue;; esac
- if $i; then
+ if $i; then
echo -n " $name"
else
- echo -n " ($name failed)"
+ echo -n " ($name failed)"
fi
done
echo " done"
;;
stop)
echo -n "Stopping TrIPE VPN daemon:"
- if test ! -S $tripesock; then
+ if test ! -S $TRIPESOCK; then
echo " not running"
elif $tripectl quit >/dev/null 2>&1; then
echo " done"
elif test ! -f $pidfile; then
echo " stale socket found: removing"
- rm -f $tripesock
+ rm -f $TRIPESOCK
elif kill `cat $pidfile`; then
echo " done (killed violently)"
else