Subversion Repositories general

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1171 → Rev 1172

/rebootd/trunk/ports/freebsd/rebootd.sh
0,0 → 1,32
#!/bin/sh
 
# PROVIDE: rebootd
# REQUIRE: NETWORKING SERVERS
# KEYWORD: FreeBSD shutdown
 
#
# Add the following lines to /etc/rc.conf to enable rebootd:
# rebootd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable rebootd
# rebootd_flags (str): Any arguments
#
 
. /etc/rc.subr
 
name="rebootd"
rcvar=`set_rcvar`
 
command="/usr/opt/sbin/rebootd"
pidfile="/var/run/rebootd.pid"
 
[ -z "${rebootd_enable}" ] && rebootd_enable="NO"
[ -z "${rebootd_flags}" ] && rebootd_flags=""
[ -z "${rebootd_configfile}" ] && rebootd_configfile="/usr/local/etc/rebootd.conf"
 
rebootd_flags="--config ${rebootd_configfile} ${rebootd_flags}"
required_files=${rebootd_configfile}
 
load_rc_config $name
 
extra_commands="reload"
run_rc_command "$1"
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/rebootd/trunk/ports/debian/rebootd
0,0 → 1,41
#! /bin/sh
set -e
 
# /etc/init.d/rebootd: start and stop the reboot daemon
 
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
 
case "$1" in
start)
echo -n "Starting rebootd"
start-stop-daemon --start --quiet --pidfile /var/run/rebootd.pid \
--exec /usr/local/sbin/rebootd -- --config /etc/rebootd.conf
echo "."
;;
stop)
echo -n "Stopping rebootd"
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/rebootd.pid
echo "."
;;
 
reload|force-reload)
echo -n "Reloading rebootd configuration"
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/rebootd.pid \
--exec /usr/local/sbin/rebootd -- --config /etc/rebootd.conf
echo "."
;;
 
restart)
echo -n "Restarting rebootd"
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /var/run/rebootd.pid
start-stop-daemon --start --quiet --pidfile /var/run/rebootd.pid \
--exec /usr/local/sbin/rebootd -- --config /etc/rebootd.conf
echo "."
;;
 
*)
echo "Usage: /etc/init.d/rebootd {start|stop|reload|force-reload|restart}"
exit 1
esac
 
exit 0
Property changes:
Added: svn:executable
+*
\ No newline at end of property