Startup script for Solaris 2.8

2002-02-11 Thread Shawn Behrens

Hi,

on Solaris, freeradius 0.4 installs rc.radiusd in /usr/local/sbin. However,
rc.radiusd uses start-stop-daemon, which is Linux-specific.

I took the shhd start/stop script that comes with OpenSSH, and changed it to
suit radiusd. I've pasted the contents of startup-script.in below.

Using the suggested symlinks, radiusd would be started last in run-level 2.
Does this sound worthy of inclusion to the next release?

Regards
Shawn

#!/bin/sh
#
# Start/Stop the FreeRadius radiusd daemon.
#
# Adapted from sshd start/stop script which was written by Michael Haardt,
1996.
#
# Shawn for solaris 2.8:
# cp startup-script /etc/init.d/radiusd
# ln -s /etc/init.d/radiusd /etc/rc2.d/S99radiusd
# ln -s /etc/init.d/radiusd /etc/rc2.d/K99radiusd

PATH=/bin:/usr/bin
RADIUSD=@sbindir@/radiusd
PID=@localstatedir@/run/radiusd.pid

case $1 in
  #{{{script}}}#{{{ start
  'start')
start=false
if [ ! -s $PID ]
then
  start=true
else
  kill -0 `cat $PID` >/dev/null 2>&1 || start=true
fi
if [ $start = true -a -x $RADIUSD ]
then
  $RADIUSD
  echo 'FreeRadius daemon started.'
else
  echo 'FreeRadius daemon not started.'
fi
  ;;
  #}}}
  #{{{ stop
  'stop')
if [ -s $PID ]
then
  if kill `cat $PID` >/dev/null 2>&1
  then
echo 'FreeRadius daemon terminated.'
  fi
fi
  ;;
  #}}}
  #{{{ *
  *)
echo 'Usage: /etc/init.d/radiusd start|stop'
;;
  #}}}
esac


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Startup script for Solaris 2.8

2002-02-07 Thread Shawn Behrens

Hi,

on Solaris, freeradius 0.4 installs rc.radiusd in /usr/local/sbin. However,
rc.radiusd uses start-stop-daemon, which is Linux-specific.

I took the shhd start/stop script that comes with OpenSSH, and changed it to
suit radiusd. I've pasted the contents of startup-script.in below.

Using the suggested symlinks, radiusd would be started last in run-level 2.
Does this sound worthy of inclusion to the next release?

Regards
Shawn

#!/bin/sh
#
# Start/Stop the FreeRadius radiusd daemon.
#
# Adapted from sshd start/stop script which was written by Michael Haardt,
1996.
#
# Shawn for solaris 2.8:
# cp startup-script /etc/init.d/radiusd
# ln -s /etc/init.d/radiusd /etc/rc2.d/S99radiusd
# ln -s /etc/init.d/radiusd /etc/rc2.d/K99radiusd

PATH=/bin:/usr/bin
RADIUSD=@sbindir@/radiusd
PID=@localstatedir@/run/radiusd.pid

case $1 in
  #{{{script}}}#{{{ start
  'start')
start=false
if [ ! -s $PID ]
then
  start=true
else
  kill -0 `cat $PID` >/dev/null 2>&1 || start=true
fi
if [ $start = true -a -x $RADIUSD ]
then
  $RADIUSD
  echo 'FreeRadius daemon started.'
else
  echo 'FreeRadius daemon not started.'
fi
  ;;
  #}}}
  #{{{ stop
  'stop')
if [ -s $PID ]
then
  if kill `cat $PID` >/dev/null 2>&1
  then
echo 'FreeRadius daemon terminated.'
  fi
fi
  ;;
  #}}}
  #{{{ *
  *)
echo 'Usage: /etc/init.d/radiusd start|stop'
;;
  #}}}
esac


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html