cleaned up a bit and edited README
This commit is contained in:
parent
2c707cd647
commit
8d5b113e7e
15
deploy.sh
15
deploy.sh
|
@ -2,9 +2,16 @@
|
||||||
# (C) 2012 Comfirm AB
|
# (C) 2012 Comfirm AB
|
||||||
# deploy.sh
|
# deploy.sh
|
||||||
# Easy deployment to multiple servers.
|
# Easy deployment to multiple servers.
|
||||||
# Deploy code, files, settings and much more to multiple servers via ssh
|
# Deploy code, files, settings and much more to multiple servers via ssh.
|
||||||
#
|
#
|
||||||
# Be sure to edit the .deploy file and /etc/deploy.conf before running this script.
|
# Authors:
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Jack Engqvist Johansson, Comfirm AB
|
||||||
|
# http://comfirm.se
|
||||||
|
# ---------------------------------------------
|
||||||
|
#
|
||||||
|
# Be sure to edit the .deploy file and /etc/deploy.conf before running this
|
||||||
|
# script.
|
||||||
# ---------------------------------------------
|
# ---------------------------------------------
|
||||||
# Usage:
|
# Usage:
|
||||||
# ---------------------------------------------
|
# ---------------------------------------------
|
||||||
|
@ -108,14 +115,12 @@ do
|
||||||
FILE_GROUP=no
|
FILE_GROUP=no
|
||||||
elif [ "$FILE_GROUP_NAME" = "$GROUP_NAME" ]; then
|
elif [ "$FILE_GROUP_NAME" = "$GROUP_NAME" ]; then
|
||||||
filename=$(basename $file)
|
filename=$(basename $file)
|
||||||
echo " * $filename"
|
echo " * $filename\t=> $server ($GROUP_NAME)"
|
||||||
if [ "$COMMAND" = "--copy" ]; then
|
if [ "$COMMAND" = "--copy" ]; then
|
||||||
# copy files
|
# copy files
|
||||||
echo "Copying files to $server($GROUP_NAME)..."
|
|
||||||
scp -i $USER_KEY $file $USER_NAME@$server:/tmp/$filename >> /dev/null
|
scp -i $USER_KEY $file $USER_NAME@$server:/tmp/$filename >> /dev/null
|
||||||
elif [ "$COMMAND" = "--replace" ]; then
|
elif [ "$COMMAND" = "--replace" ]; then
|
||||||
# move files
|
# move files
|
||||||
echo "Replacing files at $server($GROUP_NAME)..."
|
|
||||||
echo "sudo mv /tmp/$filename $file" | ssh -i $USER_KEY $USER_NAME@$server
|
echo "sudo mv /tmp/$filename $file" | ssh -i $USER_KEY $USER_NAME@$server
|
||||||
else
|
else
|
||||||
echo "Wrong options"
|
echo "Wrong options"
|
||||||
|
|
Loading…
Reference in New Issue