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