From e78ce5b77ed59e626d965d89a119d661d3ced768 Mon Sep 17 00:00:00 2001 From: pierreozoux <pierre@ozoux.net> Date: Tue, 4 Nov 2014 15:54:01 +0000 Subject: [PATCH] Fixing silent call to bash scripts --- importers/backup-init.sh | 2 +- importers/backup-snapshot.sh | 2 +- importers/mysql.sh | 2 +- importers/nginx.sh | 2 +- importers/wordpress.sh | 2 +- unit-files/nginx-discovery@.service | 4 ++-- unit-files/wordpress-discovery@.service | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/importers/backup-init.sh b/importers/backup-init.sh index 2ee2ab9..39683e1 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 481cf56..e52aa8b 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 632bc10..74e46e8 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 008c3fc..ebd69e9 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 3af43a0..fc8c070 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 5f92079..5832900 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 49be566..804d5e1 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 -- GitLab