1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ergo_ynh.git synced 2024-09-03 18:26:31 +02:00

fix port list

This commit is contained in:
navanchauhan 2022-07-07 02:39:44 +05:30
parent 151055c7fc
commit ab3285de09
3 changed files with 21 additions and 3 deletions

View file

@ -180,9 +180,15 @@ ynh_use_logrotate
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
# Build the ports list
needed_ports=()
needed_ports+=( "$port" )
needed_ports+=( "$secure_port" )
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="A modern IRC server" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port" yunohost service add $app --description="A modern IRC server" --log="/var/log/$app/$app.log" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -34,6 +34,8 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www) final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www)
port=$(ynh_app_setting_get --app=$app --key=port)
secure_port=$(ynh_app_setting_get --app=$app --key=secure_port)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
@ -108,7 +110,12 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
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="A modern IRC server" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port" # Build the ports list
needed_ports=()
needed_ports+=( "$port" )
needed_ports+=( "$secure_port" )
yunohost service add $app --description="A modern IRC server" --log="/var/log/$app/$app.log" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -113,7 +113,12 @@ 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="A modern IRC server" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port" # Build the ports list
needed_ports=()
needed_ports+=( "$port" )
needed_ports+=( "$secure_port" )
yunohost service add $app --description="A modern IRC server" --log="/var/log/$app/$app.log" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE