summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-02 17:56:19 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-02 17:56:19 +0200
commit8e0afd4d594bbec3cad835753885bca89cecc4d3 (patch)
tree2fd7a3c3097f912251d57bcb1cf23b991b8fe4b8 /bin
parenta103bc06e28f5eca6ba9c28c81ae1227d689f224 (diff)
parentffd81f22b636e77a3c7e2428c0df043e8fb53870 (diff)
Merged build-docker-ci to master
Diffstat (limited to 'bin')
-rwxr-xr-xbin/deploy.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/deploy.sh b/bin/deploy.sh
index b731e36a..15795011 100755
--- a/bin/deploy.sh
+++ b/bin/deploy.sh
@@ -60,14 +60,11 @@ ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "${remote_hos
if [[ -f \"${remote_path}/current/config/config.php\" ]]; then
echo \"Config backup\"
cp \"${remote_path}/current/config/config.php\" \"${deploy_id}-config.php\"
- fi
-
- echo \"Changing symlink\"
- unlink_cmd=\$(command -v unlink || command -v rm)
- \$unlink_cmd \"${remote_path}/current\" && ln -s \"${remote_path}/${deploy_id}\" \"${remote_path}/current\"
- if [[ -f \"${deploy_id}-config.php\" ]]; then
echo \"Restoring config\"
- cp \"${deploy_id}-config.php\" \"${remote_path}/current/config/config.php\"
+ cp \"${deploy_id}-config.php\" \"${remote_path}/${deploy_id}/config/config.php\"
fi
+
+ echo \"Changing symlink\"
+ ln -nsf \"${remote_path}/${deploy_id}\" \"${remote_path}/current\"
"