autoinst

scripts to make automated installations of debian easy
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

svc.common (427B)


      1 #!/bin/sh
      2 
      3 die()
      4 {
      5 	echo $@ | tee ./down
      6 	exit 1
      7 }
      8 
      9 SVNAME="$(basename $(pwd))"
     10 HAS_LOG="$(test -d "$(pwd)/log" && printf "yes")"
     11 exec 0<&-
     12 set -x
     13 
     14 test -f conf && . ./conf
     15 if test "${SVNAME}" = "log"
     16 then
     17 	SVLOG="$(basename $(dirname $(pwd)))"
     18 	SVNAME="${SVLOG}/${SVNAME}"
     19 	AUTO_ROTATE="${AUTO_ROTATE:="no"}"
     20 fi
     21 
     22 test "yes" = "${AUTO_ROTATE:=${HAS_LOG}}" &&
     23 	test "yes" = "${HAS_LOG}" &&
     24 		sv alarm "${SVNAME}/log"
     25 
     26 exec 2>&1