restart a script in etc/rc.d
Oliver Lehmann
lehmann at ans-netz.de
Mon Mar 2 11:25:25 PST 2009
Hi Doug,
Doug Barton wrote:
> Also, the assignment of pidfile should really come after the defaults are
> set.
>
> If you do all that and it still doesn't work, send a diff of your two rc.d
> scripts to the list.
PROVIDE is in both cases "utility" (probably a generic unchanged default)
- I've changed it to utility2 for bacula-fd2 with no changes. Here the diff:
root at nudel rc.d> diff -u bacula-fd*
--- bacula-fd 2009-02-15 23:25:03.000000000 +0100
+++ bacula-fd2 2009-03-02 20:22:40.000000000 +0100
@@ -16,16 +16,16 @@
. /etc/rc.subr
-name="bacula_fd"
+name="bacula_fd2"
rcvar=${name}_enable
command=/usr/local/sbin/bacula-fd
load_rc_config $name
-pidfile="${bacula_fd_pidfile}"
+pidfile="${bacula_fd2_pidfile}"
-: ${bacula_fd_enable="NO"}
-: ${bacula_fd_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd.conf"}
-: ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"}
+: ${bacula_fd2_enable="NO"}
+: ${bacula_fd2_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf"}
+: ${bacula_fd2_pidfile="/var/run/bacula-fd.9104.pid"}
run_rc_command "$1"
Exit 1
root at nudel rc.d> grep bacula_fd /etc/rc.conf
bacula_fd_enable="YES"
bacula_fd2_enable="YES"
bacula_fd2_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd2.conf"
bacula_fd2_pidfile="/var/run/bacula-fd.9104.pid"
root at nudel rc.d>
--
Oliver Lehmann
http://www.pofo.de/
http://wishlist.ans-netz.de/
More information about the freebsd-stable
mailing list