It seems to me that FreeBSD init.d file provided by Gabriel Rossetti (was added
in Version 3.1.0) so complicated.
I prefer to use modularity and code reuse provided by rc.d framework for
startup scripts.
File attachments: backuppc
--
Alexander Moisseev.
#!/bin/sh
#
# PROVIDE: BackupPC
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable BackupPC:
# BackupPC_enable="YES"
. /etc/rc.subr
name="BackupPC"
rcvar=`set_rcvar`
# Override these variables in /etc/rc.conf
: ${BackupPC_enable:="NO"}
: ${BackupPC_user:="backuppc"}
: ${BackupPC_group:="backuppc"}
: ${BackupPC_flags:="-d"}
: ${BackupPC_config:="/etc/${name}/config.pl"}
command="/usr/local/${name}/bin/${name}"
command_interpreter="/usr/bin/perl"
pidfile="/var/log/${name}/${name}.pid"
required_files="${BackupPC_config}"
load_rc_config $name
run_rc_command "$1"
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/