Changes

Jump to navigation Jump to search
363 bytes removed ,  11:38, 16 August 2015
Line 60: Line 60:  
  }
 
  }
 
   
 
   
uninstall() {
+
   status() {
   echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
  −
  local SURE
  −
  read SURE
  −
  if [ "$SURE" = "yes" ]; then
  −
stop
  −
    rm -f "$PIDFILE"
  −
    echo "Notice: log file is not be removed: '$LOGFILE'" >&2
  −
    update-rc.d -f <NAME> remove
  −
    rm -fv "$0"
  −
  fi
  −
}
  −
  −
status() {
   
         printf "%-50s" "Checking $NAME..."
 
         printf "%-50s" "Checking $NAME..."
 
     if [ -f $PIDFILE ]; then
 
     if [ -f $PIDFILE ]; then
Line 97: Line 84:  
   status)
 
   status)
 
     status
 
     status
    ;;
  −
  uninstall)
  −
    uninstall
   
     ;;
 
     ;;
 
   restart)
 
   restart)
Line 106: Line 90:  
     ;;
 
     ;;
 
   *)
 
   *)
     echo "Usage: $0 {start|stop|status|restart|uninstall}"
+
     echo "Usage: $0 {start|stop|status|restart}"
 
  esac
 
  esac
  

Navigation menu