From 1a3bbcb04d7b0eac2996e894fb1e4267f9df7e3e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 12 Feb 2017 14:59:02 +0000 Subject: [PATCH] Fixes --- conf/systemd.conf | 2 +- scripts/install | 2 +- scripts/remove | 19 +++++++++---------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/conf/systemd.conf b/conf/systemd.conf index f2b0fcb..6e3e919 100644 --- a/conf/systemd.conf +++ b/conf/systemd.conf @@ -9,7 +9,7 @@ WorkingDirectory=WEKAN_INSTALL_PATH ExecStart=WEKAN_NODEJS_PATH main.js Environment=NODE_ENV=production Environment=MONGO_URL=mongodb://127.0.0.1:27017/WEKAN_DB_NAME -Environment=ROOT_URL=http://127.0.0.1:WEKAN_PORT/ PORT=WEKAN_PORT +Environment=ROOT_URL=http://127.0.0.1:WEKAN_PORT/WEKAN_URI PORT=WEKAN_PORT User=wekan Restart=on-failure #StartLimitInterval=86400 diff --git a/scripts/install b/scripts/install index c0dca42..946bbc0 100755 --- a/scripts/install +++ b/scripts/install @@ -153,7 +153,7 @@ function setup_systemd_service() sed -i "s@WEKAN_INSTALL_PATH@$APP_INSTALL_PATH/.build/bundle@g" $SYSTEMD_CONF_TEMPLATE sed -i "s@WEKAN_NODEJS_PATH@$node_bin@g" $SYSTEMD_CONF_TEMPLATE sed -i "s@WEKAN_DOMAIN@$DOMAIN@g" $SYSTEMD_CONF_TEMPLATE - sed -i "s@WEKAN_PATH@$APP_URI@g" $SYSTEMD_CONF_TEMPLATE + sed -i "s@WEKAN_URI@$APP_URI@g" $SYSTEMD_CONF_TEMPLATE sed -i "s@WEKAN_DB_NAME@wekan@g" $SYSTEMD_CONF_TEMPLATE sed -i "s@WEKAN_PORT@8081@g" $SYSTEMD_CONF_TEMPLATE sudo cp $SYSTEMD_CONF_TEMPLATE /etc/systemd/system/wekan.service diff --git a/scripts/remove b/scripts/remove index 39e0217..5672903 100755 --- a/scripts/remove +++ b/scripts/remove @@ -11,15 +11,6 @@ readonly APP_INSTALL_PATH="/var/www/wekan" readonly NVM_INSTALL_DIR="/opt/nvm" readonly METEOR_INSTALL_DIR="/opt/meteor" - -function remove_user_wekan() -{ - if [[ ! -z $(sudo getent passwd wekan) ]] - then - sudo userdel wekan - fi -} - function remove_node() { if [ -d "$NVM_INSTALL_DIR" ]; @@ -75,10 +66,18 @@ function remove_nginx_conf() sudo service nginx reload } -remove_user_wekan +function remove_user_wekan() +{ + if [[ ! -z $(sudo getent passwd wekan) ]] + then + sudo userdel wekan + fi +} + remove_node remove_meteor remove_wekan remove_mongodb remove_systemd_service remove_nginx_conf +remove_user_wekan