Skip to content
Snippets Groups Projects
Commit 2df0224a authored by James Vasile's avatar James Vasile Committed by Tris Haines
Browse files

Stop pushing as root

parent 46542267
No related branches found
No related tags found
1 merge request!1Added code for byline to article template
......@@ -2,8 +2,19 @@
set -e
# Set the server details
SERVER="opentechstrategies.com"
REMOTE_DIR="/var/www/blog"
# Grab username from environment or from system username
if [ -n "$OTS_USERNAME" ]; then
username="$OTS_USERNAME"
else
username="$USER"
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
${SCRIPT_DIR}/build pub
cd ${SCRIPT_DIR}/../site/output
rsync -rvzP --delete * root@opentechstrategies.com:/var/www/blog
rsync -rvzP --delete --chown=groupname --chmod=g+w * ${USERNAME}@${SERVER}:${REMOTE_DIR}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment