diff --git a/check_process b/check_process index f6eb3c3..a24dabf 100644 --- a/check_process +++ b/check_process @@ -11,6 +11,7 @@ setup_private=0 setup_public=0 upgrade=1 + upgrade=1 from_commit=a94b50de8b68501148fa90419ad3ea8e24c675e1 backup_restore=1 multi_instance=0 incorrect_path=1 @@ -31,3 +32,7 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=a94b50de8b68501148fa90419ad3ea8e24c675e1 + name=Refactoring + manifest_arg=domain=DOMAIN&path=PATH& diff --git a/conf/nginx.conf b/conf/nginx.conf index 374702d..e172ad6 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,6 +10,9 @@ location __PATH__ { tcp_nodelay on; access_log off; + # Allow shellinabox to use 'eval' without blocking the execution. But keep a warning. + add_header Content-Security-Policy-Report-Only "script-src https: 'unsafe-eval'"; + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; more_clear_input_headers 'Accept-Encoding'; diff --git a/conf/shellinabox b/conf/shellinabox index 5d0bbea..c5d47db 100644 --- a/conf/shellinabox +++ b/conf/shellinabox @@ -15,4 +15,4 @@ SHELLINABOX_PORT=__PORT__ # # Beeps are disabled because of reports of the VLC plugin crashing # Firefox on Linux/x86_64. -SHELLINABOX_ARGS="--no-beep --localhost-only" +SHELLINABOX_ARGS="--no-beep --localhost-only --disable-ssl" diff --git a/scripts/install b/scripts/install index ef928f0..be37296 100644 --- a/scripts/install +++ b/scripts/install @@ -75,6 +75,11 @@ ynh_add_nginx_config cp ../conf/shellinabox /etc/default/shellinabox ynh_replace_string "__PORT__" "$port" "/etc/default/shellinabox" + +# Allow the service to log in syslog +ynh_replace_string " -- -q --background" " -- --background" "/etc/init.d/shellinabox" +systemctl daemon-reload + systemctl restart shellinabox #================================================= diff --git a/scripts/restore b/scripts/restore index 2709165..a54f2df 100644 --- a/scripts/restore +++ b/scripts/restore @@ -53,6 +53,11 @@ ynh_package_install shellinabox ynh_restore_file "/etc/shellinabox" ynh_restore_file "/etc/default/shellinabox" + +# Allow the service to log in syslog +ynh_replace_string " -- -q --background" " -- --background" "/etc/init.d/shellinabox" +systemctl daemon-reload + systemctl restart shellinabox #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8815730..1b3aae2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,3 +59,12 @@ ynh_add_nginx_config #================================================= systemctl reload nginx + +#================================================= +# ALLOW THE SERVICE TO LOG IN SYSLOG +#================================================= + +ynh_replace_string " -- -q --background" " -- --background" "/etc/init.d/shellinabox" +systemctl daemon-reload + +systemctl restart shellinabox