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:
parent
925b1a8784
commit
8a29dc8bf2
3 changed files with 3 additions and 7 deletions
|
@ -56,7 +56,7 @@ ynh_app_setting_set $app is_public $is_public
|
|||
|
||||
#Install dependencies
|
||||
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 install -y mongodb-org gzip curl graphicsmagick npm
|
||||
|
||||
|
@ -71,7 +71,7 @@ sudo n $NODE_VERSION
|
|||
sudo mkdir -p $final_path
|
||||
|
||||
# Create user
|
||||
sudo useradd -d "$final_path" -M $serviceuser
|
||||
id -u $serviceuser || sudo useradd -d "$final_path" -M $serviceuser
|
||||
|
||||
# Copy and set systemd configuration
|
||||
sed -i "s@#ROOTURL#@$domain@g" ../conf/rocketchat.service
|
||||
|
|
|
@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
serviceuser=$(ynh_app_setting_get $app serviceuser)
|
||||
|
||||
sudo systemctl stop $app.service
|
||||
|
||||
|
@ -28,8 +27,5 @@ sudo rm -f /etc/systemd/system/$app.service
|
|||
# remove database!!!
|
||||
sudo mongo rocketchat --eval "db.dropDatabase()"
|
||||
|
||||
# remove user!!!
|
||||
sudo userdel -r $serviceuser
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl reload nginx
|
||||
|
|
|
@ -39,7 +39,7 @@ sudo yunohost app checkurl "${domain}${path}" -a "$app" || ynh_die
|
|||
sudo mkdir -p $final_path
|
||||
|
||||
# Create user
|
||||
sudo useradd -d "$final_path" -M $serviceuser
|
||||
id -u $serviceuser || sudo useradd -d "$final_path" -M $serviceuser
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
|
|
Loading…
Reference in a new issue