From 4b6e84a0c55727c5ffcee7e0befe98532a40ad57 Mon Sep 17 00:00:00 2001 From: Moul Date: Sun, 24 May 2015 17:07:31 -0400 Subject: [PATCH] update scripts --- scripts/install | 6 ------ scripts/remove | 3 --- scripts/upgrade | 27 +++++---------------------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/scripts/install b/scripts/install index f09e80b..01d4754 100755 --- a/scripts/install +++ b/scripts/install @@ -31,9 +31,3 @@ ucoind config --noupnp --remoteh $domain --port $port --salt $salt --passwd $pwd # Launch uCoin node with daemon pm2 pm2 start /usr/bin/ucoind -- start --noupnp - -# Add uCoin daemon to the YunoHost monitoring -#sudo yunohost service add ucoin --log pm2 logs - -# Reload SSOwat -#sudo yunohost app ssowatconf diff --git a/scripts/remove b/scripts/remove index 92641d6..cb855ed 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,6 +12,3 @@ sudo apt-get -y remove nodejs node-gyp npm # Close opened port sudo yunohost firewall disallow TCP $port - -# Reload SSOwat -sudo yunohost app ssowatconf diff --git a/scripts/upgrade b/scripts/upgrade index 113c925..8333673 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,27 +1,10 @@ #!/bin/bash -app=ucoin -# Retrieve arguments -domain=$(sudo yunohost app setting $app domain) -path=$(sudo yunohost app setting $app path) -is_public=$(sudo yunohost app setting $app is_public) - -# Remove trailing "/" for next commands -path=${path%/} +# Stop uCoin daemon +pm2 stop ucoind # Upgrade ucoin package -sudo apt-get update - -# If app is public, add url to SSOWat conf as skipped_uris -if [ "$is_public" = "Yes" ]; -then - # See install script - sudo yunohost app setting $app unprotected_uris -v "/" - # Remove old settings - sudo yunohost app setting $app skipped_uris -d -fi - -# Restart services -sudo service nginx reload -sudo yunohost app ssowatconf +sudo npm install -g ucoin +# Restart uCoin daemon +pm2 restart ucoind