diff --git a/importers/backup-init.sh b/importers/backup-init.sh index 2ee2ab987c3e7a3dd227974c8f0f97fb71c4399a..39683e10ca0246b3d11fa647f605038f974f6eb0 100755 --- a/importers/backup-init.sh +++ b/importers/backup-init.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -eux echo initializing backups for $USER mkdir -p /data/per-user/$USER/backup/mysql diff --git a/importers/backup-snapshot.sh b/importers/backup-snapshot.sh index 481cf5695a6c4e2334df7ee2407f7ca399ecd4a6..e52aa8bfea3937d06565c3548b2ebf1b444522ff 100755 --- a/importers/backup-snapshot.sh +++ b/importers/backup-snapshot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -eux if [ -e /data/per-user/$USER/mysql ]; then echo backing up mysql databases for $USER diff --git a/importers/mysql.sh b/importers/mysql.sh index 632bc10f8cb5590b4512c8d12ce905db1cedab56..74e46e863bf57d3bfb96bce7ab6d5d7a7d95c05e 100755 --- a/importers/mysql.sh +++ b/importers/mysql.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -eux if [ ! -d "/data/per-user/$USER/mysql/data" ]; then mkdir -p /data/per-user/$USER/mysql/data diff --git a/importers/nginx.sh b/importers/nginx.sh index 008c3fc097473e6c3c59104dc4b84951d89a4c4e..ebd69e9039bc5dc8727c610eedd65c2028ed2061 100755 --- a/importers/nginx.sh +++ b/importers/nginx.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -eux if [ ! -e "/data/per-user/$USER/nginx/data/www-content/index.html" ]; then if [ -e "/data/per-user/$USER/nginx/data/GITURL" ]; then diff --git a/importers/wordpress.sh b/importers/wordpress.sh index 3af43a04285e76712dce378ac3690ee0e5072a47..fc8c07084e133f0c7d8c3d005266f7ec34aa0fa8 100755 --- a/importers/wordpress.sh +++ b/importers/wordpress.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -eux if [ ! -d "/data/per-user/$USER/wordpress/data" ]; then cd /data/per-user/$USER/ diff --git a/unit-files/nginx-discovery@.service b/unit-files/nginx-discovery@.service index 5f92079a9b806d2eb7ce6be39730118ecd15ebdf..58329009e12724f4132046d353a372f43001b921 100644 --- a/unit-files/nginx-discovery@.service +++ b/unit-files/nginx-discovery@.service @@ -14,7 +14,7 @@ BindsTo=nginx@%i.service [Service] # Start ## Test whether service is accessible and then register useful information -ExecStart=/bin/bash -c ' \ +ExecStart=/bin/bash -euxc ' \ sleep 3; \ while true; do \ app=`echo %p | cut -d"-" -f1`; \ @@ -29,6 +29,6 @@ ExecStart=/bin/bash -c ' \ done' # Stop -ExecStop=/bin/bash -ceux ' \ +ExecStop=/bin/bash -euxc ' \ app=`echo %p | cut -d"-" -f1`; \ /usr/bin/etcdctl rm /services/$app/%i diff --git a/unit-files/wordpress-discovery@.service b/unit-files/wordpress-discovery@.service index 49be56619869eebe687035d2a5f680aade6d4ee3..804d5e1ef9bccc19259e462491bdbe3e89e94db3 100644 --- a/unit-files/wordpress-discovery@.service +++ b/unit-files/wordpress-discovery@.service @@ -14,7 +14,7 @@ BindsTo=wordpress@%i.service [Service] # Start ## Test whether service is accessible and then register useful information -ExecStart=/bin/bash -c ' \ +ExecStart=/bin/bash -euxc ' \ sleep 3; \ while true; do \ app=`echo %p | cut -d"-" -f1`; \ @@ -29,6 +29,6 @@ ExecStart=/bin/bash -c ' \ done' # Stop -ExecStop=/bin/bash -ceux ' \ +ExecStop=/bin/bash -euxc ' \ app=`echo %p | cut -d"-" -f1`; \ /usr/bin/etcdctl rm /services/$app/%i