#!/bin/sh # # copy-to-cyclonus -- copy wwwroot directory to cyclonus # # This script is intended to run by root. # WWWROOT="/var/www/ADP/" # include trailing slash CYCLONUS_DOCROOT="/srv/http/adp.gomtuu.net" USR="root" # owner of destination files GRP="daemon" # group owner of destination files RSYNC=rsync if klist -s; then # turn wwwroot into absolute path, if needed: echo "$WWWROOT" | grep -q '^[[:space:]]*/.*' 2>/dev/null if test $? -ne 0; then exe=`readlink -e $0 2>/dev/null` dir=`dirname $exe 2>/dev/null` WWWROOT="$dir/$WWWROOT" fi $RSYNC -v -rtl --del -e 'rsh -PN' \ --no-perms --owner --group --chown=$USR:$GRP \ $WWWROOT cyclonus:$CYCLONUS_DOCROOT else echo "Kerberos credentials expired or non-existent." fi # vim:ts=4:sw=4:noet:ft=sh