=== removed file 'sbin/zsvgen' --- sbin/zsvgen 2014-02-09 21:46:21 +0000 +++ sbin/zsvgen 1970-01-01 00:00:00 +0000 @@ -1,32 +0,0 @@ -#!/bin/zsh -# vim: ft=zsh noet ts=4 sts=4 sw=4 - -autoload -Uz zsv_config -zsv_config -zsv_parse - -for name in $svtab; do - zsv_dir=$zsv_svdir/$name - mkdir -p $zsv_dir - ln -s ${commands[zsv.run]} $zsv_dir/run - - # log - if [[ $svtab_logf[$name] != '-' ]]; then - mkdir -p $zsv_svdir/log/$name - ln -s ${commands[zsv.log.run]} $zsv_dir/log/run - elif [[ -x $zsv_dir/log/run ]]; then - rm -f $zsv_dir/log/run - [[ -S $zsv_dir/log/supervise/control ]] && \ - echo x >$zsv_dir/log/supervise/control - rm -rf $zsv_dir/log - fi - - # flags - zsv_flags=${svtab_flags[$name]} - if [[ $zsv_flags == *'!'* ]]; then - touch $zsv_svdir/down - else - rm -f $zsv_svdir/down - fi - -done === modified file 'zsh-functions/zsv_config' --- zsh-functions/zsv_config 2014-02-09 21:46:21 +0000 +++ zsh-functions/zsv_config 2014-02-07 18:07:53 +0000 @@ -1,31 +1,13 @@ -if (($+zsv_mode)); then - if [[ $zsv_mode == log ]]; then - zsv_dir=$PWD:h - else - zsv_dir=$PWD - fi +if [[ $zsv_mode == log ]]; then + zsv_dir=$PWD:h else - zsv_dir=/run/zsv/foo + zsv_dir=$PWD fi + zsv_name=$zsv_dir:t zsv_svdir=$zsv_dir:h [[ -e /etc/zsvrc ]] && source /etc/zsvrc : ${zsv_svtab:=/etc/svtab} : ${zsv_default_runf=zsv_generic} : ${zsv_default_logf=zsv_logger} -: ${zsv_cgroup=/sys/fs/cgroup/zsv/$zsv_name} - -# autoload all zsv_ functions -local -a func_files -local func -func_files=( $^fpath/site_${~1}_*(N) ) - -for func in $func_files ; do - if ! [[ -r "$func" ]]; then - print -r >&2 - "$func is not readable" - continue - fi - autoload -Uz $func:t -done - # vim: ft=zsh noet ts=4 sts=4 sw=4 === removed file 'zsh-functions/zsv_generic' --- zsh-functions/zsv_generic 2014-02-09 21:46:21 +0000 +++ zsh-functions/zsv_generic 1970-01-01 00:00:00 +0000 @@ -1,15 +0,0 @@ -if ! grep -q "[^ ]* $zsv_cgroup:h " /proc/mounts; then - mkdir -p $zsv_cgroup:h - mount zsv $zsv_cgroup:h -t cgroup -o rw,nosuid,nodev,noexec,relatime,name=zsv -fi -mkdir -p $zsv_cgroup && echo $$ >>$zsv_cgroup/tasks - -for c in ${(s::)zsv_flags}; do - case $c in - ('&') exec 2>&1;; - ('@') exec >/dev/null;; - esac -done - -exec "${run[@]}" -# vim: ft=zsh noet ts=4 sts=4 sw=4 === removed file 'zsh-functions/zsv_logger' --- zsh-functions/zsv_logger 2014-02-09 21:46:21 +0000 +++ zsh-functions/zsv_logger 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -exec logger -t $zsv_name -# vim: ft=zsh noet ts=4 sts=4 sw=4 === renamed file 'sbin/zsv.log.run' => 'zsv.log.run' === renamed file 'sbin/zsv.run' => 'zsv.run'