added S99gb for loading at boot.

do a 'sudo make install' to install
to /var/gigablast/ dir
This commit is contained in:
Matt Wells 2014-06-23 07:32:38 -06:00
parent 7b98dff979
commit f0b7d6ad1a
2 changed files with 30 additions and 3 deletions

View File

@ -492,10 +492,12 @@ install:
ln -s /var/gigablast/data0/gb $(DESTDIR)/usr/bin/gb
# if machine restarts...
# the new way that does not use run-levels anymore
rm -f $(DESTDIR)/etc/init.d/gb
ln -s /lib/init/upstart-job $(DESTDIR)/etc/init.d/gb
# rm -f $(DESTDIR)/etc/init.d/gb
# ln -s /lib/init/upstart-job $(DESTDIR)/etc/init.d/gb
# initctl upstart-job conf file (gb stop|start|reload)
cp init.gb.conf $(DESTDIR)/etc/init/gb.conf
# cp init.gb.conf $(DESTDIR)/etc/init/gb.conf
cp S99gb /etc/init.d/gb
ln -s /etc/init.d/gb /etc/rc3.d/S99gb
.cpp.o:
$(CC) $(DEFS) $(CPPFLAGS) -c $*.cpp

25
S99gb Executable file
View File

@ -0,0 +1,25 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: gb
# Required-Start: $remote_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run the Gigablast Search Engine
### END INIT INFO
case "$1" in
start)
start-stop-daemon --start --background --exec /usr/bin/gb -- -d
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac