#!/bin/bash
#
# chkconfig: 2345 85 15
# description: qadsl is an autologin & keep-alive daemon for various \
#              WAN/LAN/ADSL/CABLE connections provided by several \
#              (mainly Swedish) ISPs.
# processname: qadsl
# pidfile: /var/run/qadsl.pid
# config: /etc/qadsl.conf

case $1 in
          start)
	          echo -n "Starting qadsl: "
		  qadsl -c /etc/qadsl.conf -l
                  [ $? -eq  0 ] && echo "OK"
                  ;;
           stop)
                  echo -n "Stopping qadsl: "
		  qadsl -c /etc/qadsl.conf -o
                  [ $? -eq 0 ] && echo "OK"
		  ;;
        restart) 
	          $0 stop;
		  $0 start;
		  ;;
              *)  
                  echo "Usage: $0 {start|stop|restart}"
esac
