packages: varnish/varnish.init - add varnishadm target to initscript for ea...
glen
glen at pld-linux.org
Mon Apr 5 14:20:03 CEST 2010
Author: glen Date: Mon Apr 5 12:20:03 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add varnishadm target to initscript for easy access to varnishadm
---- Files affected:
packages/varnish:
varnish.init (1.16 -> 1.17)
---- Diffs:
================================================================
Index: packages/varnish/varnish.init
diff -u packages/varnish/varnish.init:1.16 packages/varnish/varnish.init:1.17
--- packages/varnish/varnish.init:1.16 Thu Feb 11 14:04:54 2010
+++ packages/varnish/varnish.init Mon Apr 5 14:19:58 2010
@@ -38,15 +38,18 @@
vcl_label="$($date +${LOGNAME}${LOGNAME:+:}%s.%N)"
fi
+varnishadm() {
+ /usr/bin/varnishadm -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} "$@"
+}
# for simplier code
vcl_load() {
- /usr/bin/varnishadm -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} vcl.load "$@"
+ varnishadm vcl.load "$@"
}
vcl_use() {
- /usr/bin/varnishadm -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} vcl.use "$@"
+ varnishadm vcl.use "$@"
}
vcl_discard() {
- /usr/bin/varnishadm -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} vcl.discard "$@"
+ varnishadm vcl.discard "$@"
}
# configtest itself
@@ -109,7 +112,7 @@
# default limits
SERVICE_LIMITS="${SERVICE_LIMIS:--n $NFILES -l $MEMLOCK}"
- # DAEMON_OPTS is used by the init script. If you add or remove options, make
+ # DAEMON_OPTS is used by the init script. If you add or remove options, make
# sure you update this section, too.
DAEMON_OPTS="
-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT}
@@ -161,7 +164,7 @@
# checkconfig needs running varnish
checkconfig
fi
- stop
+ stop
start
}
@@ -205,12 +208,16 @@
checkconfig|configtest)
checkconfig 1
;;
+ varnishadm)
+ shift
+ varnishadm "$@"
+ ;;
status)
status --pidfile $PIDFILE varnishd
RETVAL=$?
;;
*)
- msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|checkconfig|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|checkconfig|varnishadm|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnish.init?r1=1.16&r2=1.17&f=u
More information about the pld-cvs-commit
mailing list