1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00

Updates mongodb and user handling

This commit is contained in:
Selamanse 2017-08-17 23:38:22 +02:00
parent 925b1a8784
commit 8a29dc8bf2
3 changed files with 3 additions and 7 deletions

View file

@ -56,7 +56,7 @@ ynh_app_setting_set $app is_public $is_public
#Install dependencies #Install dependencies
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 >/dev/null sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 >/dev/null
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update sudo apt-get update
sudo apt-get install -y mongodb-org gzip curl graphicsmagick npm sudo apt-get install -y mongodb-org gzip curl graphicsmagick npm
@ -71,7 +71,7 @@ sudo n $NODE_VERSION
sudo mkdir -p $final_path sudo mkdir -p $final_path
# Create user # Create user
sudo useradd -d "$final_path" -M $serviceuser id -u $serviceuser || sudo useradd -d "$final_path" -M $serviceuser
# Copy and set systemd configuration # Copy and set systemd configuration
sed -i "s@#ROOTURL#@$domain@g" ../conf/rocketchat.service sed -i "s@#ROOTURL#@$domain@g" ../conf/rocketchat.service

View file

@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get $app final_path)
serviceuser=$(ynh_app_setting_get $app serviceuser)
sudo systemctl stop $app.service sudo systemctl stop $app.service
@ -28,8 +27,5 @@ sudo rm -f /etc/systemd/system/$app.service
# remove database!!! # remove database!!!
sudo mongo rocketchat --eval "db.dropDatabase()" sudo mongo rocketchat --eval "db.dropDatabase()"
# remove user!!!
sudo userdel -r $serviceuser
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl reload nginx sudo systemctl reload nginx

View file

@ -39,7 +39,7 @@ sudo yunohost app checkurl "${domain}${path}" -a "$app" || ynh_die
sudo mkdir -p $final_path sudo mkdir -p $final_path
# Create user # Create user
sudo useradd -d "$final_path" -M $serviceuser id -u $serviceuser || sudo useradd -d "$final_path" -M $serviceuser
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS