Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
slackbuilds/n/vpnc/rc.vpnc

33 lines
478 B

#!/bin/sh
case "$1" in
start)
if ! /sbin/lsmod | grep -q tun ; then
/sbin/modinfo tun
fi
/usr/sbin/vpnc
;;
stop)
/usr/sbin/vpnc-disconnect
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
if [ -s /var/run/vpnc/pid ] && kill -0 `cat /var/run/vpnc/pid` ; then
echo "vpnc is running"
else
echo "vpnc is not running"
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac