#! /bin/sh # $Id$ # $URL$ : ${host=cobalon} : ${uhost=root@${host#*@}} : ${prefix=/srv/www/massmail} : ${webuser=www-v-9} # be super careful. case $destdir$prefix in *[!A-Za-z0-9_./-]*|*/.*|*/|[!/]*|*//*|'') echo "unsafe destdir/prefix; aborting" >&2 exit 2 ;; /*/*/*) : # ok, looks legit ;; *) echo "unsafe destdir/prefix; aborting" >&2 exit 2 esac set -ex case $1 in prepare) ssh "$uhost" <