97b494b0d3
[Thomas: - Remove trailing whitespace everywhere - Rewrap the Config.in help text - Fix Config.in comment, the proper text for BR2_PREFER_STATIC_LIB is "dynamic library", not "libdl library" - Use a PID file in the init script - Show OK / FAIL when stopping the service - Remove the largefile/IPv6 handling in c-icap.mk, since they are now mandatory. We therefore pass --enable-large-files and --enable-ipv6 unconditionally. - Remove the reference to a non-existing C_ICAP_INSTALL_TARGET_CONFIGS install target hook. - Install the init script unconditionally. - Remove unneeded example configuration files (*.default) from /etc, and fixup the c-icap.conf so that the default values work with Buildroot - Properly handle the *-config scripts installed by c-icap. - Add hash file.] Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
28 lines
553 B
Bash
28 lines
553 B
Bash
#!/bin/sh
|
|
|
|
# (Re)create directories
|
|
mkdir -p /var/run/c-icap
|
|
mkdir -p /var/log/c-icap
|
|
|
|
case "$1" in
|
|
start)
|
|
echo -n "Starting c-icap server: "
|
|
start-stop-daemon -S -q -b -m -p /var/run/c-icap.pid \
|
|
-x /usr/bin/c-icap -- -N
|
|
[ $? == 0 ] && echo "OK" || echo "FAIL"
|
|
;;
|
|
stop)
|
|
echo -n "Stopping c-icap server: "
|
|
start-stop-daemon -K -q -p /var/run/c-icap.pid
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
;;
|
|
restart|reload)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: /etc/init.d/S96cicap {start|stop|restart|reload}"
|
|
exit 1
|
|
esac
|