← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 1447730] [NEW] Debian Startup script

 

Public bug reported:

Should work havent tested it yet might be worth while to add into distro

#!/bin/bash
# Init Script for ADCH++

CONF=/etc/adchpp/default.conf
PID=$(ps -A -o pid,cmd|grep adchppd | grep -v grep |head -n 1 | awk '{print $1}')

case "$1" in
 start)
  printf "Starting ADCH++"
  adchppd -d -c $CONF
    ;;

 stop)
  printf "Stopping ADCH++"
  kill -SIGTERM $PID
    ;;

 enable)
  printf "Enabling ADCH++ Service"
   update-rc.d adchpp defaults
 ;;

 disable
  printf "Disabling ADCH++ Service"
   update-rc.d -f adchpp remove

 *)
  echo "Usage: /etc/init.d/blah {start|stop|enable|disable}"
  exit 1
    ;;

esac
exit 0

** Affects: adchpp
     Importance: Undecided
         Status: Opinion

** Description changed:

  Should work havent tested it yet might be worth while to add into distro
  
  #!/bin/bash
  # Init Script for ADCH++
  
  CONF=/etc/adchpp/default.conf
- PID=$(ps -A -o pid,cmd|grep adchpp | grep -v grep |head -n 1 | awk '{print $1}')
+ PID=$(ps -A -o pid,cmd|grep adchppd | grep -v grep |head -n 1 | awk '{print $1}')
  
  case "$1" in
- 	start)
- 		printf "Starting ADCH++ "
- 		adchpp -d -c $CONF  
-     ;;
- 	
- 	stop)
- 		printf "Stopping ADCH++"
- 		kill -SIGTERM $PID
-     ;;
- 	
- 	enable)
- 		printf "Enabling ADCH++ Service"
- 			update-rc.d adchpp defaults
- 	;;
- 	
- 	disable
- 		printf "Disabling ADCH++ Service"
- 			update-rc.d -f adchpp remove
- 	
- 	*)
- 		echo "Usage: /etc/init.d/blah {start|stop|enable|disable}"
- 		exit 1
-     ;;
- 	
+  start)
+   printf "Starting ADCH++ "
+   adchppd -d -c $CONF
+     ;;
+ 
+  stop)
+   printf "Stopping ADCH++"
+   kill -SIGTERM $PID
+     ;;
+ 
+  enable)
+   printf "Enabling ADCH++ Service"
+    update-rc.d adchpp defaults
+  ;;
+ 
+  disable
+   printf "Disabling ADCH++ Service"
+    update-rc.d -f adchpp remove
+ 
+  *)
+   echo "Usage: /etc/init.d/blah {start|stop|enable|disable}"
+   exit 1
+     ;;
+ 
  esac
  exit 0

** Description changed:

  Should work havent tested it yet might be worth while to add into distro
  
  #!/bin/bash
  # Init Script for ADCH++
  
  CONF=/etc/adchpp/default.conf
  PID=$(ps -A -o pid,cmd|grep adchppd | grep -v grep |head -n 1 | awk '{print $1}')
  
  case "$1" in
   start)
-   printf "Starting ADCH++ "
+   printf "Starting ADCH++"
    adchppd -d -c $CONF
      ;;
  
   stop)
    printf "Stopping ADCH++"
    kill -SIGTERM $PID
      ;;
  
   enable)
    printf "Enabling ADCH++ Service"
     update-rc.d adchpp defaults
   ;;
  
   disable
    printf "Disabling ADCH++ Service"
     update-rc.d -f adchpp remove
  
   *)
    echo "Usage: /etc/init.d/blah {start|stop|enable|disable}"
    exit 1
      ;;
  
  esac
  exit 0

** Changed in: adchpp
       Status: New => Opinion

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to ADCH++.
https://bugs.launchpad.net/bugs/1447730

Title:
  Debian Startup script

Status in ADCH++:
  Opinion

Bug description:
  Should work havent tested it yet might be worth while to add into
  distro

  #!/bin/bash
  # Init Script for ADCH++

  CONF=/etc/adchpp/default.conf
  PID=$(ps -A -o pid,cmd|grep adchppd | grep -v grep |head -n 1 | awk '{print $1}')

  case "$1" in
   start)
    printf "Starting ADCH++"
    adchppd -d -c $CONF
      ;;

   stop)
    printf "Stopping ADCH++"
    kill -SIGTERM $PID
      ;;

   enable)
    printf "Enabling ADCH++ Service"
     update-rc.d adchpp defaults
   ;;

   disable
    printf "Disabling ADCH++ Service"
     update-rc.d -f adchpp remove

   *)
    echo "Usage: /etc/init.d/blah {start|stop|enable|disable}"
    exit 1
      ;;

  esac
  exit 0

To manage notifications about this bug go to:
https://bugs.launchpad.net/adchpp/+bug/1447730/+subscriptions


Follow ups

References