=== modified file 'sbin/zsvgen' --- sbin/zsvgen 2014-06-24 09:21:12 +0000 +++ sbin/zsvgen 2014-05-27 13:15:23 +0000 @@ -138,4 +138,4 @@ # make runsvdir re-read the directories killall --signal CONT --user ${USER:-root} runsvdir -touch ${SVDIR}/.zsv +exit 0 === removed file 'zsh-functions/confz_zsv_init' --- zsh-functions/confz_zsv_init 2014-06-24 09:21:12 +0000 +++ zsh-functions/confz_zsv_init 1970-01-01 00:00:00 +0000 @@ -1,84 +0,0 @@ -# vim: ft=zsh noet ts=4 sts=4 sw=4 - -# -# confz functions for zsv -# - -zmodload zsh/datetime - -confz_zsv_configured_check() { - [[ -e /etc/svtab ]] || die - do_command=( zsvgen ) - [[ $vars[svdir]/.zsv -nt /etc/svtab ]] -} - - -confz_runsv_running_check() { - checkarg service - - #require zsv_configured - - [[ -e $vars[service] ]] || die - do_command=( sv start $vars[service] ) - - local START - START=$EPOCHREALTIME - # wait up to 10s for supervise/control to appear - while (( $EPOCHREALTIME - $START < 10 )); do - [[ -e $vars[service]/supervise/control ]] && break - if (($+commands[inotifywait])); then - inotifywait -r -q -t 1 -e create,move,close_write $vars[service] - else - sleep 0.2 - fi - done - sv check $vars[service] -} - - -confz_zsv_autorestart_check() { - checkarg service - - require runsv_running :service - - do_command=( sv restart $vars[service] ) - - local f - for f in ${(f)"$(<$vars[service]/restart.files)"}; do - [[ -e $f ]] || return 1 - [[ $vars[service]/restart.files -nt $f ]] || return 1 - done - return 0 -} - - -confz_zsv_autoreload_check() { - checkarg service - - require zsv_autorestart_check :service - - do_command=( sv hup $vars[service] ) - - local f - for f in ${(f)"$(<$vars[service]/reload.files)"}; do - [[ -e $f ]] || return 1 - [[ $vars[service]/reload.files -nt $f ]] || return 1 - done - return 0 -} - - -confz_autoreload_current_check() { - defarg svdir /run/service - - require zsv_configured :svdir - - local sv - for sv in $vars[svdir]/*(-/); do - if [[ -e $sv/reload.files ]]; then - require zsv_autoreload service=$sv - else - require zsv_autorestart service=$sv - fi - done -}