#!/bin/bash USER=kollegen HOST=despina.uberspace.de LOCAL_OUT="/Users/chris/kollegen/pendel/out/" # the directory where your web site files should go RSYNC_DEST_DIR=html/pendel/wp-content/uploads/pendel/ffm echo "--- STEP 1: Uploading changes to wordpress plugin" rsync -avz $LOCAL_OUT ${USER}@${HOST}:${RSYNC_DEST_DIR} # Stop in error case retVal=$? if [ $retVal -ne 0 ]; then exit $retVal fi WP_DIR=html/pendel echo "" echo "--- STEP 2: Reactivating plugin" ssh ${USER}@${HOST} "cd ${WP_DIR}; wp plugin deactivate pendel; wp plugin activate pendel;" retVal=$? exit $retVal