summaryrefslogtreecommitdiffstats
path: root/Services/nodejs/run.sh
diff options
context:
space:
mode:
authorstartxfr <clarue@startx.fr>2015-11-29 22:29:05 +0100
committerstartxfr <clarue@startx.fr>2015-11-29 22:29:05 +0100
commita4930f0838f1224bdf4fa0885e858e7a865513ca (patch)
treea9d95b08985c439f2b812382e3b4a36cc990e87f /Services/nodejs/run.sh
parenteb3d88b10a0feb302a9fd1ec60a7a92caebb856c (diff)
downloadphpmyadmin-a4930f0838f1224bdf4fa0885e858e7a865513ca.tar.gz
phpmyadmin-a4930f0838f1224bdf4fa0885e858e7a865513ca.tar.bz2
phpmyadmin-a4930f0838f1224bdf4fa0885e858e7a865513ca.tar.xz
phpmyadmin-a4930f0838f1224bdf4fa0885e858e7a865513ca.zip
reshappe nodejs container
Diffstat (limited to 'Services/nodejs/run.sh')
-rw-r--r--Services/nodejs/run.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/Services/nodejs/run.sh b/Services/nodejs/run.sh
index f10bbd2..366446c 100644
--- a/Services/nodejs/run.sh
+++ b/Services/nodejs/run.sh
@@ -41,6 +41,15 @@ function display_container_nodejs_header {
# and start generating host keys
function begin_config {
echo "=> BEGIN NODEJS CONFIGURATION"
+ if [[ -d $TMP_APP_PATH ]]; then
+ echo "COPY application from $TMP_APP_PATH into $APP_PATH"
+ FILE_LIST=$(find $TMP_APP_PATH -maxdepth 1 -mindepth 1 -printf "%f\n")
+ for FILE in $FILE_LIST; do
+ echo -n "adding $APP_PATH/$FILE"
+ mv -f $TMP_APP_PATH/$FILE $APP_PATH/
+ echo " DONE"
+ done
+ fi
}
# End configuration process just before starting daemon
@@ -51,8 +60,8 @@ function end_config {
# Start the nodejs executable with application entrypoint
# the running shell
function start_daemon {
- echo "=> Starting nodejs daemon ..."
- display_container_started
+ echo "=> Starting nodejs daemon ..." | tee -a $STARTUPLOG
+ display_container_started | tee -a $STARTUPLOG
exec node $APP_MAIN
}
@@ -64,4 +73,4 @@ check_nodejs_environment | tee -a $STARTUPLOG
display_container_nodejs_header | tee -a $STARTUPLOG
begin_config | tee -a $STARTUPLOG
end_config | tee -a $STARTUPLOG
-start_daemon | tee -a $STARTUPLOG
+start_daemon