- introduced try-restart (as specified by LSB 3.1)
Changed files:
squid.init -> 1.50
start
}
+condrestart() {
+ # if service is up, do configtest
+ if [ -f /var/lock/subsys/squid ]; then
+ configtest
+ if [ $RETVAL != 0 ]; then
+ exit 1
+ fi
+ stop
+ start
+ else
+ RETVAL=0
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
stop)
stop
;;
- restart|force-reload)
+ restart)
restart
;;
- reload)
+ try-restart)
+ condrestart
+ ;;
+ reload|force-reload)
reload
;;
status)
check_cache_dirs
;;
*)
- msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|init|restart|try-restart|reload|force-reload|status}"
exit 3
esac