diff --git a/scripts/change_url b/scripts/change_url index c77f72c..a82ff1b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -69,7 +69,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="$datadir/log/debug-last.log" --line_match="Ui.UiServer Web interface" --timeout=120 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120 #================================================= # MODIFY URL IN NGINX CONF @@ -113,7 +113,7 @@ ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" - # START SYSTEMD SERVICE #================================================= -ynh_systemd_action --service_name=$app --action="start" --log_path="$datadir/log/debug-last.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 44071f8..fe82a7d 100755 --- a/scripts/install +++ b/scripts/install @@ -73,8 +73,6 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $fs_port ynh_script_progression --message="Installing dependencies..." ynh_install_app_dependencies $pkg_dependencies -pip3 install --upgrade pip -pip3 install gevent-websocket msgpack-python gevent base58 merkletools rsa PySocks pyasn1 websocket_client gevent-ws coincurve maxminddb #================================================= # CREATE DEDICATED USER @@ -107,6 +105,16 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP +#================================================= +# BUILDING ZERONET +#================================================= +ynh_script_progression --message="Building zeronet..." + +pushd "$final_path" + pip3 install --upgrade pip + pip3 install -r requirements.txt +popd + #================================================= # CREATE DATA DIR #================================================= @@ -143,7 +151,7 @@ yunohost service add $app --description="$app service" --log="$datadir/log/debug ynh_script_progression --message="Starting a systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="$datadir/log/debug-last.log" --line_match="Ui.UiServer Web interface" --timeout=120 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120 #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index fcad05a..eeaac7b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -80,8 +80,16 @@ ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies -pip3 install --upgrade pip -pip3 install gevent-websocket msgpack-python gevent base58 merkletools rsa PySocks pyasn1 websocket_client gevent-ws coincurve maxminddb + +#================================================= +# BUILDING ZERONET +#================================================= +ynh_script_progression --message="Building zeronet..." + +pushd "$final_path" + pip3 install --upgrade pip + pip3 install -r requirements.txt +popd #================================================= # RESTORE VARIOUS FILES @@ -116,7 +124,7 @@ yunohost service add $app --description="$app service" --log="$datadir/log/debug #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="$datadir/log/debug-last.log" --line_match="Ui.UiServer Web interface" --timeout=120 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120 #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 10ce28a..95fc918 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,7 +51,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --log_path="$datadir/log/debug-last.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -110,11 +110,19 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading dependencies..." ynh_install_app_dependencies $pkg_dependencies -pip3 install --upgrade pip -pip3 install gevent-websocket msgpack-python gevent base58 merkletools rsa PySocks pyasn1 websocket_client gevent-ws coincurve maxminddb #================================================= # SPECIFIC UPGRADE +#================================================= +# BUILDING ZERONET +#================================================= +ynh_script_progression --message="Building zeronet..." + +pushd "$final_path" + pip3 install --upgrade pip + pip3 install -r requirements.txt +popd + #================================================= # CREATE DATA DIR #================================================= @@ -145,14 +153,14 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app service" --log "$datadir/log/debug-last.log" --needs_exposed_ports "$fs_port" +yunohost service add $app --description="$app service" --log="$datadir/log/debug-last.log" --needs_exposed_ports="$fs_port" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="$datadir/log/debug-last.log" --line_match="Ui.UiServer Web interface" --timeout=120 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120 #================================================= # RELOAD NGINX