#!/bin/sh # # (c) 2008 Pedro Pinto # rc.vpnc for Zenwalk # distributed under GPL License [ -f /usr/sbin/vpnc ] || exit 0 pid="$(pidof vpnc 2> /dev/null)" case "$1" in start) if [ -z ${pid} ] ; then /usr/sbin/vpnc else echo "rc.vpnc is already started." fi ;; stop) if [ ! -z ${pid} ] ; then /usr/sbin/vpnc-disconnect else echo "rc.vpnc is not running." fi ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: rc.vpnc {start|stop|restart}" exit 1 esac exit 0