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
b19f00469f
commit
e4c990b819
4 changed files with 25 additions and 16 deletions
|
@ -39,8 +39,8 @@ Can the app be used by multiple users?
|
||||||
|
|
||||||
#### Supported architectures
|
#### Supported architectures
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/nodebb%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/nodebb/)
|
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/nodebb.svg)](https://ci-apps.yunohost.org/ci/apps/nodebb/)
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/nodebb%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/nodebb/)
|
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/nodebb.svg)](https://ci-apps-arm.yunohost.org/ci/apps/nodebb/)
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"url": "https://__DOMAIN__",
|
"url": "https://__DOMAIN__",
|
||||||
"secret": "__SECRET__",
|
"secret": "__SECRET__",
|
||||||
"database": "postgres",
|
|
||||||
"port": "__PORT__",
|
"port": "__PORT__",
|
||||||
|
"database": "postgres",
|
||||||
"postgres": {
|
"postgres": {
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"port": "5432",
|
"port": "5432",
|
||||||
|
|
|
@ -51,7 +51,7 @@ ynh_app_setting_set --app=$app --key=$secret --value="$secret"
|
||||||
#=================================================
|
#=================================================
|
||||||
# FIND AND OPEN A PORT
|
# FIND AND OPEN A PORT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Finding an available port..." --time --weight=1
|
ynh_script_progression --message="Finding an available port..." --weight=1
|
||||||
|
|
||||||
# Find an available port
|
# Find an available port
|
||||||
port=$(ynh_find_port --port=4567)
|
port=$(ynh_find_port --port=4567)
|
||||||
|
@ -60,7 +60,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..." --time --weight=1
|
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a PostgreSQL database..." --time --weight=1
|
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=9
|
||||||
|
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
|
@ -80,7 +80,7 @@ ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring system user..." --time --weight=1
|
ynh_script_progression --message="Configuring system user..." --weight=3
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
@ -105,7 +105,7 @@ ynh_use_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..." --time --weight=1
|
ynh_script_progression --message="Setting up source files..." --weight=2
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
@ -114,7 +114,7 @@ ynh_setup_source --dest_dir="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --time --weight=1
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=3
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
@ -122,7 +122,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# Add Systemd service
|
# Add Systemd service
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
|
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||||
|
|
||||||
#ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
#ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||||
#ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
#ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||||
|
@ -157,9 +157,9 @@ popd
|
||||||
# START NodeBB IN BACKGROUND
|
# START NodeBB IN BACKGROUND
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
cat /etc/systemd/system/$app.service
|
# cat /etc/systemd/system/$app.service
|
||||||
systemctl daemon-reload
|
# systemctl daemon-reload
|
||||||
systemctl enable $app.service
|
# systemctl enable $app.service
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
@ -171,9 +171,9 @@ yunohost service add $app --description="A short description of the app" --log="
|
||||||
#=================================================
|
#=================================================
|
||||||
# START ETHERPAD IN BACKGROUND
|
# START ETHERPAD IN BACKGROUND
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --time --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=restart --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
@ -189,8 +189,10 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
systemctl reload nginx
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SEND A README FOR THE ADMIN
|
# SEND A README FOR THE ADMIN
|
||||||
|
@ -205,4 +207,10 @@ $mail_content
|
||||||
|
|
||||||
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"
|
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"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Installation of $app completed" --last
|
||||||
|
|
||||||
ynh_send_readme_to_admin "$message"
|
ynh_send_readme_to_admin "$message"
|
||||||
|
|
1
scripts/upgrade
Normal file
1
scripts/upgrade
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#https://docs.nodebb.org/configuring/upgrade/
|
Loading…
Reference in a new issue