diff --git a/services/Instagram/deploy.sh b/services/Instagram/deploy.sh index 083b65dc..03bcd91b 100755 --- a/services/Instagram/deploy.sh +++ b/services/Instagram/deploy.sh @@ -29,7 +29,6 @@ env GZIP=-9 tar -czf ${tarpath} \ echo "Build file: $tarpath" -#ssh h "rm -rf $destpath/*" scp ${tarpath} hoster@${server}:${destpath} echo "Build file successfully uploaded on ${server}" diff --git a/services/Instagram/forever.json b/services/Instagram/forever.json new file mode 100644 index 00000000..f368fc2e --- /dev/null +++ b/services/Instagram/forever.json @@ -0,0 +1,8 @@ +{ + "uid": "hudozka-instagram", + "append": true, + "watch": false, + "script": "index.js", + "sourceDir": "/home/hoster/www/art.shburg.org/services/instagram/out", + "wordingDir": "/home/hoster/www/art.shburg.org/services/instagram" +} diff --git a/services/Instagram/install.sh b/services/Instagram/install.sh index ded4d1aa..43cb44b9 100755 --- a/services/Instagram/install.sh +++ b/services/Instagram/install.sh @@ -2,16 +2,16 @@ dir_path="$1" build_file="$2" -script="out/index.js" +app="hudozka-instagram" +script="forever.json" cd ${dir_path} gunzip -c ${build_file} | tar xopf - npm install --production --loglevel error -#starting www -#if forever restart ${script}; then -# echo Instagram Microservice restarted -#else -# forever start ${script} -# echo Instagram Microservice started -#fi +if forever restart ${app}; then + echo Instagram Microservice restarted +else + forever start ${script} + echo Instagram Microservice started +fi