Can someone explain what I'm missing for this script to work at startup?
Łukasz Wąsikowski
lukasz at wasikowski.net
Wed Aug 24 18:31:11 UTC 2016
W dniu 2016-08-24 o 19:08, Larry Rosenman pisze:
> 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_version}.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.
This may be related to the fact, that after login you have some env
variables set that tika needs. It's common with java software.
--
best regards,
Lukasz Wasikowski
More information about the freebsd-rc
mailing list