mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Fix
This commit is contained in:
parent
6cb09f68b1
commit
be3ca35593
2 changed files with 22 additions and 3 deletions
|
@ -88,6 +88,23 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||||
ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_mongo_restore_db --database="$db_name" < ./dump.bson
|
ynh_mongo_restore_db --database="$db_name" < ./dump.bson
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY A CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring a mongod..." --weight=1
|
||||||
|
|
||||||
|
sed -i "s/^# engine:/ engine: wiredTiger/" /etc/mongod.conf
|
||||||
|
sed -i "s/^#replication:/replication:\n replSetName: rs01/" /etc/mongod.conf
|
||||||
|
|
||||||
|
ynh_exec_warn_less systemctl enable $mongodb_servicename --quiet
|
||||||
|
ynh_systemd_action --service_name=$mongodb_servicename --action=restart
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
#mongo --eval "printjson(rs.initiate())"
|
||||||
|
|
||||||
|
ynh_mongo_exec --command="printjson(rs.initiate())" --eval
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -115,14 +132,14 @@ yunohost service add $app --description="Team collaboration communication platfo
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM
|
# RELOAD NGINX AND PHP-FPM
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,7 @@ ynh_systemd_action --service_name=$mongodb_servicename --action=restart
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
mongo --eval "printjson(rs.initiate())"
|
mongo --eval "printjson(rs.initiate())"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -159,6 +160,7 @@ ynh_use_logrotate --non-append
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
|
|
||||||
yunohost service add $app --description="Team collaboration communication platform" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Team collaboration communication platform" --log="/var/log/$app/$app.log"
|
||||||
|
sleep 120
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
@ -166,7 +168,7 @@ yunohost service add $app --description="Team collaboration communication platfo
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=10
|
ynh_script_progression --message="Starting a systemd service..." --weight=10
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$mongodb_servicename --action=restart --log_path=systemd
|
ynh_systemd_action --service_name=$mongodb_servicename --action=restart --log_path=systemd
|
||||||
ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue