Skip to content

Instantly share code, notes, and snippets.

@ssummer3
ssummer3 / upgradeServicefolderByGit.sh
Last active February 22, 2016 21:32 — forked from monksy/upgradeServicefolderByGit.sh
This gist is responsible for upgrading a system service (systemd) and going into the folder by it's specified user and performing a git pull. After the pull occures bring the service back up.
#! /bin/bash
set -o nounset
set -o errexit
if [[ $# -lt 3 ]]; then
echo "No arguments supplied."
echo " Example: upgradeFoldByBash: [Service name] [service account] [folder]"
exit 1
fi
@ssummer3
ssummer3 / bucket.sh
Last active February 9, 2016 21:04
S3 HTML5 Applications
aws s3 mb s3://${BUCKET}
aws s3 website s3://${BUCKET} --index-document index.html --error-document index.html
aws s3 sync . s3://${BUCKET} --exclude '.*' --exclude '*.md' --exclude '*.json' --delete --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
#aws s3 rm --recursive s3://${BUCKET}