aboutsummaryrefslogtreecommitdiff
path: root/test/data/app-a/scripts/postinstall
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-10-18 13:38:58 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-10-18 13:38:58 +0200
commit83c13f1181c4062ca5296ea956e950064bde0ffe (patch)
treeea021190acabc6e675510e13987cd4addbf50765 /test/data/app-a/scripts/postinstall
parent993c9a7807e38b365f48334fff6640e07647af03 (diff)
downloadapp.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.tar.gz
app.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.tar.bz2
app.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.tar.xz
app.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.zip
o Making all scripts be run from the root/ directory. Do not assume you're in current/.
Diffstat (limited to 'test/data/app-a/scripts/postinstall')
-rw-r--r--test/data/app-a/scripts/postinstall18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/data/app-a/scripts/postinstall b/test/data/app-a/scripts/postinstall
index a77f86f..c1a0cf1 100644
--- a/test/data/app-a/scripts/postinstall
+++ b/test/data/app-a/scripts/postinstall
@@ -1,11 +1,21 @@
-#!/bin/bash
+#!/bin/bash -e
echo "Hello World!"
-if [ -d root/etc/$APPSH_INSTANCE ]
+if [ -d etc/$APPSH_INSTANCE ]
then
- find root/etc/$APPSH_INSTANCE -type f -maxdepth 1 | while read file
+ find etc/$APPSH_INSTANCE -type f -maxdepth 1 | while read file
do
- cp $file root/
+ cp $file .
done
fi
+
+LOGS=$APPSH_APPS/$APPSH_NAME/$APPSH_INSTANCE/logs
+
+if [ ! -d $LOGS ]
+then
+ echo "Creating logs directory"
+ mkdir $LOGS
+fi
+
+ln -s $LOGS logs