1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zeronet_ynh.git synced 2024-09-03 17:46:12 +02:00
This commit is contained in:
yalh76 2021-05-23 09:48:04 +02:00
parent dc52611275
commit f931fe8329
4 changed files with 37 additions and 13 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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