This commit is contained in:
Éric Gaspar
2023-12-09 21:43:50 +01:00
parent 0d7f3bd7c2
commit 6542f17fb3
5 changed files with 35 additions and 104 deletions

View File

@ -45,6 +45,22 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Simple, private file sharing" --log="/var/log/$app/$app.log"
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=2
ynh_add_config --template="config.js" --destination="$install_dir/server/config.js"
chmod 400 "$install_dir/server/config.js"
chown $app: "$install_dir/server/config.js"
#=================================================
# SPECIFIC SETUP
#=================================================
@ -58,32 +74,6 @@ pushd "$install_dir"
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build
popd
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=2
ynh_add_config --template="../conf/config.js" --destination="$install_dir/server/config.js"
chmod 400 "$install_dir/server/config.js"
chown $app: "$install_dir/server/config.js"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Simple, private file sharing" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================