Sha256: 5f6255e024afb3ad8e15c4b75e3e4fbf5fb6eb6770b61f414eb1b3bbe499d0c1

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

#! /bin/sh

### BEGIN INIT INFO
# Provides:		   sfpagent
# Required-Start:	
# Required-Stop:	
# Default-Start:	2 3 4 5
# Default-Stop:		
# Short-Description:	SFP Agent Daemon
### END INIT INFO

set -e

bin=`which sfpagent`
if [ $bin = "" ]; then
	if [ -f "/usr/bin/sfpagent" ]; then
		bin="/usr/bin/sfpagent"
	elif [ -f "/usr/local/bin/sfpagent" ]; then
		bin="/usr/local/bin/sfpagent"
	fi
fi

test -x $bin || exit 1

umask 022

. /lib/lsb/init-functions

if [ `/usr/bin/id -u` != "0" ]; then
  log_daemon_msg "Error: must be run with root"
  exit 1
fi

export PATH="${PATH:+$PATH:}/usr/sbin:/sbin:/usr/local/bin"

case "$1" in
  start)
	log_daemon_msg "Starting SFP Agent daemon" "sfpagent" || true
   $bin -s
	;;
  stop)
	log_daemon_msg "Stopping SFP Agent daemon" "sfpagent" || true
   $bin -t
	;;
  restart)
	log_daemon_msg "Restarting SFP Agent daemon" "sfpagent" || true
   $bin -r
	;;
  status)
	$bin -a && exit 0 || exit $?
	;;

  *)
	log_action_msg "Usage: /etc/init.d/sfpagent {start|stop|restart|status}" || true
	exit 1
esac

exit 0

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sfpagent-0.4.15 bin/init_script
sfpagent-0.4.14 bin/init_script
sfpagent-0.4.13 bin/init_script
sfpagent-0.4.12 bin/init_script
sfpagent-0.4.11 bin/init_script
sfpagent-0.4.10 bin/init_script
sfpagent-0.4.9 bin/init_script
sfpagent-0.4.8 bin/init_script
sfpagent-0.4.7 bin/init_script
sfpagent-0.4.6 bin/init_script
sfpagent-0.4.5 bin/init_script
sfpagent-0.4.4 bin/init_script
sfpagent-0.4.3 bin/init_script
sfpagent-0.4.2 bin/init_script