diff --git a/scripts/_common.sh b/scripts/_common.sh index 6b08913..e362c27 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -42,7 +42,7 @@ setup_lxd() { exposed_ports_if_cluster() { if [ "$cluster" -eq 1 ]; then - echo "8443" + echo "--needs_exposed_ports=8443" fi } diff --git a/scripts/install b/scripts/install index a9c81ca..8ef9750 100644 --- a/scripts/install +++ b/scripts/install @@ -83,7 +83,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -yunohost service add "$app" --description="$app daemon for YunoRunner" --needs_exposed_ports="$(exposed_ports_if_cluster)" +yunohost service add "$app" --description="$app daemon for YunoRunner" "$(exposed_ports_if_cluster)" ynh_add_config --template="cron" --destination="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index e39b5eb..da6f121 100644 --- a/scripts/restore +++ b/scripts/restore @@ -54,7 +54,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable "$app.service" --quiet -yunohost service add "$app" --description="$app daemon for YunoRunner" --needs_exposed_ports="$(exposed_ports_if_cluster)" +yunohost service add "$app" --description="$app daemon for YunoRunner" "$(exposed_ports_if_cluster)" ynh_restore_file --origin_path="/etc/cron.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 4316ac6..f84551c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,7 +108,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -yunohost service add "$app" --description="$app daemon for YunoRunner" --needs_exposed_ports="$(exposed_ports_if_cluster)" +yunohost service add "$app" --description="$app daemon for YunoRunner" "$(exposed_ports_if_cluster)" ynh_add_config --template="cron" --destination="/etc/cron.d/$app"