Merge branch 'master' into eng-testing

This commit is contained in:
yalh76
2021-05-13 22:09:15 +02:00
12 changed files with 80 additions and 82 deletions

View File

@@ -74,6 +74,14 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_use_nodejs
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# CREATE A POSTGRESQL DATABASE
#=================================================
@@ -97,6 +105,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:$app "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@@ -105,14 +117,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# SPECIFIC SETUP
#=================================================
@@ -122,6 +126,16 @@ ynh_script_progression --message="Creating LDAP user..."
yunohost user create $ldap_user --firstname "SvcWikijsLdap" --lastname "SvcWikijsLdap" --mail ${ldap_user}@$domain --password $ldap_password -q 0
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a config file..."
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml"
chmod 400 "$final_path/config.yml"
chown $app:$app "$final_path/config.yml"
#=================================================
# SETUP SYSTEMD
#=================================================
@@ -130,23 +144,8 @@ ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config --others_var="ynh_node ynh_node_load_PATH"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R $app: $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================