diff --git a/readme-vars.yml b/readme-vars.yml index 8d2fd2b..b03c8ed 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -39,6 +39,7 @@ opt_param_env_vars: - {env_var: "USER_PASSWORD", env_value: "password", desc: "Optionally set a sudo password for `linuxserver.io`, the ssh user. If this or `USER_PASSWORD_FILE` are not set but `SUDO_ACCESS` is set to true, the user will have passwordless sudo access."} - {env_var: "USER_PASSWORD_FILE", env_value: "/path/to/file", desc: "Optionally specify a file that contains the password. This setting supersedes the `USER_PASSWORD` option (works with docker secrets)."} - {env_var: "USER_NAME", env_value: "linuxserver.io", desc: "Optionally specify a user name (Default:`linuxserver.io`)"} + - {env_var: "LOG_STDOUT", env_value: "", desc: "Set to `true` to log to stdout instead of file."} # application setup block app_setup_block_enabled: true app_setup_block: | diff --git a/root/etc/s6-overlay/s6-rc.d/log-openssh-server/run b/root/etc/s6-overlay/s6-rc.d/log-openssh-server/run index a4200cd..7c2a436 100755 --- a/root/etc/s6-overlay/s6-rc.d/log-openssh-server/run +++ b/root/etc/s6-overlay/s6-rc.d/log-openssh-server/run @@ -3,5 +3,10 @@ USER_NAME=${USER_NAME:-linuxserver.io} -exec \ - s6-setuidgid "${USER_NAME}" s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/logs/openssh +if [[ "${LOG_STDOUT,,}" == "true" ]]; then + exec \ + s6-setuidgid "${USER_NAME}" s6-log +.* 1 +else + exec \ + s6-setuidgid "${USER_NAME}" s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/logs/openssh +fi