From 43be981b640a597a525d85add4deb23f9c164a44 Mon Sep 17 00:00:00 2001 From: Jeremy HOCDE Date: Thu, 20 Jul 2017 20:07:11 +0100 Subject: system/c-icap: Added (ICAP server). Signed-off-by: David Spencer --- system/c-icap/rc.c-icap | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 system/c-icap/rc.c-icap (limited to 'system/c-icap/rc.c-icap') diff --git a/system/c-icap/rc.c-icap b/system/c-icap/rc.c-icap new file mode 100644 index 0000000000000..6dc06609ba691 --- /dev/null +++ b/system/c-icap/rc.c-icap @@ -0,0 +1,38 @@ +#!/bin/sh +# Start/stop/restart c-icap. + +# Start c-icap: +icap_start() { + CMDLINE="/usr/bin/c-icap" + echo -n "Starting c-icap daemon: $CMDLINE" + $CMDLINE -f /etc/c-icap.conf + echo +} + +# Stop c-icap: +icap_stop() { + echo -n "Stopping c-icap daemon..." + for i in $(pgrep -f c-icap); do kill -15 $i; done + echo +} + +# Restart c-icap: +icap_restart() { + icap_stop + sleep 1 + icap_start +} + +case "$1" in +'start') + icap_start + ;; +'stop') + icap_stop + ;; +'restart') + icap_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac -- cgit v1.2.3