freebsd-ports/sysutils/backuppc-devel/files/backuppc.in
John Marino bcbae34226 change command_interpreter from /usr/bin/perl to ${PREFIX}/bin/perl
Several ports had rc.d scripts with hardcoded command_interpreter string
as /usr/bin/perl.  This symlink is not guaranteed to be in place, and it
isn't even an option for perl 5.20.  For affected ports, the interpreter
was changed to localbase.

In one case, the interpreter was correct, but it wasn't surround by
quotes.  Since the rc.d script would break if a space was contained in
${PREFIX}, quotes were added in that case.
2015-01-05 13:18:58 +00:00

29 lines
570 B
Bash

#!/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=backuppc_enable
load_rc_config $name
: ${backuppc_enable:="NO"}
: ${backuppc_flags:="-d"}
: ${backuppc_user:="backuppc"}
: ${backuppc_group:="backuppc"}
: ${backuppc_config:="%%ETCDIR%%/config.pl"}
command_interpreter="%%PREFIX%%/bin/perl"
command="%%PREFIX%%/bin/BackupPC"
required_files="${backuppc_config}"
pidfile="/var/run/BackupPC/BackupPC.pid"
run_rc_command "$1"