mirror of
https://github.com/YunoHost-Apps/nodebb_ynh.git
synced 2024-09-03 19:46:29 +02:00
Fix
This commit is contained in:
parent
6f4bb8e0fb
commit
6cd61ef35b
3 changed files with 30 additions and 27 deletions
|
@ -169,7 +169,7 @@ yunohost service add $app --description="Nodejs Forum" --log="/var/log/$app/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
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=restart --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action=restart --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
@ -193,15 +193,20 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
#=================================================
|
#=================================================
|
||||||
# SEND A README FOR THE ADMIN
|
# SEND A README FOR THE ADMIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Sending a readme for the admin..." --weight=1
|
||||||
|
|
||||||
mail_content=$(cat $install_log | grep '\(Username\|Password\)')*
|
message="NodeBB was successfully installed :)
|
||||||
|
|
||||||
message=" $app was successfully installed :)
|
|
||||||
Please open your $app domain: https://$domain$path_url
|
Please open your $app domain: https://$domain$path_url
|
||||||
|
|
||||||
$mail_content
|
Complete the registration process from the setup page displayed.
|
||||||
|
Details for MySQL database to be enterted while registration process:
|
||||||
|
|
||||||
If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/nodebb_ynh"
|
Database login: $app
|
||||||
|
Database name: $app
|
||||||
|
Database password: $db_pwd
|
||||||
|
|
||||||
|
If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/matomo_ynh/issues"
|
||||||
|
|
||||||
ynh_send_readme_to_admin "$message"
|
ynh_send_readme_to_admin "$message"
|
||||||
|
|
||||||
|
|
|
@ -71,23 +71,6 @@ chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
pushd $final_path
|
|
||||||
datebackup=$(ynh_app_setting_get $app datebackup)
|
|
||||||
mongorestore mongo_backup$datebackup/
|
|
||||||
ynh_secure_remove mongo_backup$datebackup/
|
|
||||||
popd
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
|
||||||
|
|
||||||
yunohost service add $app --description="Nodejs Forum" --log="/var/log/$app/$app.log"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL NODEJS
|
# INSTALL NODEJS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -98,12 +81,27 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE THE POSTGRESQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
||||||
|
|
||||||
ynh_restore_file "/etc/systemd/system/$app.service"
|
ynh_psql_test_if_first_run
|
||||||
systemctl enable $app.service --quiet
|
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
systemctl start $app
|
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
|
|
||||||
|
yunohost service add $app --description="Nodejs Forum" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# START SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -156,7 +156,7 @@ yunohost service add $app --description="Nodejs Forum" --log="/var/log/$app/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
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"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue