Application Auto-start script (init.d) {start|stop|...}
 
Application Auto-start script (init.d) {start|stop|restart}

I wrote this script for my self-compiled version of Apache 2 which is located in /usr/local/apache2.
This script is tested with Suse Linux 9.1 and is based on a default script named skeleton.

#! /bin/sh
. /etc/rc.status
rc_reset
case "$1" in
  start)
    echo -n "Starting Apache 2"
    /usr/local/apache2/bin/apachectl start
    rc_status -v
    ;;
  stop)
    echo -n "Shutting down Apache 2"
    /usr/local/apache2/bin/apachectl stop
    rc_status -v
    ;;
  restart)
    $0 stop
    $0 start
    rc_status
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
esac
rc_exit

Locate this script under: /etc/init.d.
 
admin / Oct 31, 2004
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2017 / lookass.ch
makememad@lookass.ch