diff --git a/conf/systemd.service b/conf/systemd.service index 3cc5fc5..53a900e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -5,7 +5,7 @@ After=network.target [Service] User=noreply ExecStart=/usr/bin/python3 __FINALPATH__/zeronet.py --ui_port __PORT__ --ui_host __DOMAIN__ --fileserver_port __FS_PORT__ --data_dir __DATADIR__/data --log_dir __DATADIR__/log -WorkingDirectory=/var/www/ZeroNet-py3 +WorkingDirectory=__FINALPATH__ ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure diff --git a/scripts/install b/scripts/install index 0aa9771..872a7db 100755 --- a/scripts/install +++ b/scripts/install @@ -190,7 +190,7 @@ ynh_script_progression --message="Integrating service in YunoHost..." ### - Remove the section "REMOVE SERVICE INTEGRATION IN YUNOHOST" in the remove script ### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script ### - And the section "INTEGRATE SERVICE IN YUNOHOST" in the upgrade script -ynh_add_systemd_config --service="$app" --template="systemd.service" --others_var="$fs_port $datadir" +ynh_add_systemd_config --service="$app" --template="systemd.service" --others_var="fs_port datadir" yunohost service add $app --description "$app service" --log "$datadir/log/debug-last.log" --needs_exposed_ports "$fs_port" diff --git a/scripts/restore b/scripts/restore index 06c7079..7b61ac4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -101,7 +101,7 @@ systemctl enable $app.service #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -ynh_add_systemd_config --service="$app" --template="systemd.service" --others_var="$fs_port $datadir" +ynh_add_systemd_config --service="$app" --template="systemd.service" --others_var="fs_port datadir" yunohost service add $app --description "$app service" --log "$datadir/log/debug-last.log" --needs_exposed_ports "$fs_port" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c9d52d6..706fc8d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,7 +140,7 @@ chown -R $app: $datadir # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -ynh_add_systemd_config --service="$app" --template="systemd.service" --others_var="$fs_port $datadir" +ynh_add_systemd_config --service="$app" --template="systemd.service" --others_var="fs_port datadir" yunohost service add $app --description "$app service" --log "$datadir/log/debug-last.log" --needs_exposed_ports "$fs_port" #=================================================