mirror of
https://github.com/YunoHost-Apps/nomad_ynh.git
synced 2024-09-03 19:55:53 +02:00
Fix needs_exposed_ports
This commit is contained in:
parent
76ee33d927
commit
629fbd55c5
3 changed files with 12 additions and 3 deletions
|
@ -80,9 +80,11 @@ ynh_app_setting_set --app=$app --key=serf_port --value=$serf_port
|
|||
# Open the port
|
||||
ynh_script_progression --message="Configuring firewall..."
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $rpc_port
|
||||
needs_exposed_ports="$rpc_port"
|
||||
if [ "$node_type" == "server" ]
|
||||
then
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $serf_port
|
||||
needs_exposed_ports="$serf_port $needs_exposed_ports"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -220,7 +222,7 @@ ynh_use_logrotate
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports="$needs_exposed_ports"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -98,9 +98,11 @@ chown -R $app:$app "$config_path"
|
|||
# Open the port
|
||||
ynh_script_progression --message="Configuring firewall..."
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $rpc_port
|
||||
needs_exposed_ports="$rpc_port"
|
||||
if [ "$node_type" == "server" ]
|
||||
then
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $serf_port
|
||||
needs_exposed_ports="$serf_port $needs_exposed_ports"
|
||||
fi
|
||||
|
||||
if [ "$node_type" == "client" ]
|
||||
|
@ -137,7 +139,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports="$needs_exposed_ports"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -179,7 +179,12 @@ ynh_use_logrotate --non-append
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||
needs_exposed_ports="$rpc_port"
|
||||
if [ "$node_type" == "server" ]
|
||||
then
|
||||
needs_exposed_ports="$serf_port $needs_exposed_ports"
|
||||
fi
|
||||
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports="$needs_exposed_ports"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
Loading…
Reference in a new issue