mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
43be981b64
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
38 lines
529 B
Bash
38 lines
529 B
Bash
#!/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
|