Skip to content
Snippets Groups Projects
Commit e78ce5b7 authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Fixing silent call to bash scripts

parent 0a092d44
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash -eux
echo initializing backups for $USER echo initializing backups for $USER
mkdir -p /data/per-user/$USER/backup/mysql mkdir -p /data/per-user/$USER/backup/mysql
......
#!/bin/bash #!/bin/bash -eux
if [ -e /data/per-user/$USER/mysql ]; then if [ -e /data/per-user/$USER/mysql ]; then
echo backing up mysql databases for $USER echo backing up mysql databases for $USER
......
#!/bin/bash #!/bin/bash -eux
if [ ! -d "/data/per-user/$USER/mysql/data" ]; then if [ ! -d "/data/per-user/$USER/mysql/data" ]; then
mkdir -p /data/per-user/$USER/mysql/data mkdir -p /data/per-user/$USER/mysql/data
......
#!/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/www-content/index.html" ]; then
if [ -e "/data/per-user/$USER/nginx/data/GITURL" ]; then if [ -e "/data/per-user/$USER/nginx/data/GITURL" ]; then
......
#!/bin/bash #!/bin/bash -eux
if [ ! -d "/data/per-user/$USER/wordpress/data" ]; then if [ ! -d "/data/per-user/$USER/wordpress/data" ]; then
cd /data/per-user/$USER/ cd /data/per-user/$USER/
......
...@@ -14,7 +14,7 @@ BindsTo=nginx@%i.service ...@@ -14,7 +14,7 @@ BindsTo=nginx@%i.service
[Service] [Service]
# Start # Start
## Test whether service is accessible and then register useful information ## Test whether service is accessible and then register useful information
ExecStart=/bin/bash -c ' \ ExecStart=/bin/bash -euxc ' \
sleep 3; \ sleep 3; \
while true; do \ while true; do \
app=`echo %p | cut -d"-" -f1`; \ app=`echo %p | cut -d"-" -f1`; \
...@@ -29,6 +29,6 @@ ExecStart=/bin/bash -c ' \ ...@@ -29,6 +29,6 @@ ExecStart=/bin/bash -c ' \
done' done'
# Stop # Stop
ExecStop=/bin/bash -ceux ' \ ExecStop=/bin/bash -euxc ' \
app=`echo %p | cut -d"-" -f1`; \ app=`echo %p | cut -d"-" -f1`; \
/usr/bin/etcdctl rm /services/$app/%i /usr/bin/etcdctl rm /services/$app/%i
...@@ -14,7 +14,7 @@ BindsTo=wordpress@%i.service ...@@ -14,7 +14,7 @@ BindsTo=wordpress@%i.service
[Service] [Service]
# Start # Start
## Test whether service is accessible and then register useful information ## Test whether service is accessible and then register useful information
ExecStart=/bin/bash -c ' \ ExecStart=/bin/bash -euxc ' \
sleep 3; \ sleep 3; \
while true; do \ while true; do \
app=`echo %p | cut -d"-" -f1`; \ app=`echo %p | cut -d"-" -f1`; \
...@@ -29,6 +29,6 @@ ExecStart=/bin/bash -c ' \ ...@@ -29,6 +29,6 @@ ExecStart=/bin/bash -c ' \
done' done'
# Stop # Stop
ExecStop=/bin/bash -ceux ' \ ExecStop=/bin/bash -euxc ' \
app=`echo %p | cut -d"-" -f1`; \ app=`echo %p | cut -d"-" -f1`; \
/usr/bin/etcdctl rm /services/$app/%i /usr/bin/etcdctl rm /services/$app/%i
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment