Date: Wed, 24 Aug 2016 17:24:42 -0400 From: Ryan Stone <rysto32@gmail.com> To: Larry Rosenman <ler@lerctr.org> Cc: freebsd-rc@freebsd.org Subject: Re: Can someone explain what I'm missing for this script to work at startup? Message-ID: <CAFMmRNz5UwJptmTA6UzATh6WWtoA0JTB=kecF==6dLX91reDAw@mail.gmail.com> In-Reply-To: <775f07971e09126b4b72527565f2e7d1@thebighonker.lerctr.org> References: <775f07971e09126b4b72527565f2e7d1@thebighonker.lerctr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Your script is probably being called with "quietstart" or "faststart" as
its argument. I'd recommend using the rc.subr infrastructure for your rc.d
scripts to avoid such issues.
On Wed, Aug 24, 2016 at 1:08 PM, Larry Rosenman <ler@lerctr.org> wrote:
> I have the following script in /usr/local/etc/rc.d/tika:
> thebighonker.lerctr.org /usr/local/etc/rc.d $ cat tika
> #!/bin/sh
> #
> # $FreeBSD$
> #
>
> # PROVIDE: tika
> # REQUIRE: LOGIN
> # KEYWORD: shutdown
>
> #
> # Add the following lines to /etc/rc.conf to enable exim:
> #
> #tika_enable="YES"
> #
> tika_version=1.12
> #
>
> case $1 in
> start)
> /usr/sbin/daemon -u tika -p /var/run/tika.pid -P
> /var/run/tika_server.pid \
> -r /usr/local/bin/java -jar /home/ler/tika-server-${tika_v
> ersion}.jar
> ;;
> stop)
> kill `cat /var/run/tika_server.pid`
> ;;
> *)
> echo "usage $0: start|stop"
> ;;
> esac
>
> exit 0;
> thebighonker.lerctr.org /usr/local/etc/rc.d $
>
> and at startup it does NOT start, but after login, service tika start
> works.
>
> Can someone with -rc fu help?
>
>
> --
> Larry Rosenman http://www.lerctr.org/~ler
> Phone: +1 214-642-9640 E-Mail: ler@lerctr.org
> US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281
> _______________________________________________
> freebsd-rc@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-rc
> To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org"
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNz5UwJptmTA6UzATh6WWtoA0JTB=kecF==6dLX91reDAw>
