Public bug reported:
hello,
it would be awesome to have a configtest action in the init.d script ,
in this way you can safely test a vcl configuration by just doing
/etc/init.d/varnish configtest
this can be done by applying this simple patch to /etc/init.d/varnish
--- /etc/init.d/varnish.old 2013-06-29 16:21:10.000000000 +0200
+++ /etc/init.d/varnish 2014-02-24 14:00:34.342417000 +0100
@@ -89,6 +89,10 @@
exit $?
}
+configtest() {
+ $DAEMON ${DAEMON_OPTS} -C -n /tmp > /dev/null && echo "Syntax ok"
+}
+
case "$1" in
start)
case "${START:-}" in
@@ -113,8 +117,11 @@
$0 stop
$0 start
;;
+ configtest)
+ configtest
+ ;;
*)
- log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}"
+ log_success_msg "Usage: $0
{start|stop|restart|reload|force-reload|configtest}"
exit 1
;;
esac
Cheers
Samuele
** Affects: varnish (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1284095
Title:
add configtest action to init.d script
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/varnish/+bug/1284095/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs