commit:     5ff77dc01dcdf7fac4d59c94b4159fbf903853a0
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 11 20:34:27 2019 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Dec 11 20:39:57 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ff77dc0

www-misc/shellinabox: instruct daemon to log to a file.

Closes: https://bugs.gentoo.org/702182
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 www-misc/shellinabox/files/shellinaboxd.conf    | 15 +++++++++------
 www-misc/shellinabox/files/shellinaboxd.init    |  5 +++--
 www-misc/shellinabox/shellinabox-2.20-r1.ebuild |  2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/www-misc/shellinabox/files/shellinaboxd.conf 
b/www-misc/shellinabox/files/shellinaboxd.conf
index 3c34ab08f5e..d80ecd0250d 100644
--- a/www-misc/shellinabox/files/shellinaboxd.conf
+++ b/www-misc/shellinabox/files/shellinaboxd.conf
@@ -1,5 +1,5 @@
 # conf.d file for shellinaboxd
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Options available (copied from the man page):
@@ -26,8 +26,8 @@ SIAB_CSS_DIR="/usr/share/shellinabox-resources"
 # 
 # The administrator should make sure that there are matching certificates for
 # each of the virtual hosts on this server, and that there is a generic 
certifiā€
-# cate.pem file.                                                               
                                                                                
        
-# 
+# cate.pem file.
+
 # If no suitable certificate is installed, shellinaboxd will attempt to invoke
 # /usr/bin/openssl and create a new self-signed certificate. This only
 # succeeds if, after dropping privileges, shellinaboxd has write
@@ -41,7 +41,7 @@ SIAB_CSS_DIR="/usr/share/shellinabox-resources"
 #
 SIAB_CERT_DIR="/etc/shellinabox/cert"
 
-# By default, shellinaboxd redirectes all incoming HTTP requests to their
+# By default, shellinaboxd redirects all incoming HTTP requests to their
 # equivalent HTTPS URLs. If promoting of connections to encrypted SSL/TLS
 # sessions is undesired, this behavior can be disabled.
 # 
@@ -49,7 +49,7 @@ SIAB_CERT_DIR="/etc/shellinabox/cert"
 # intranets, if SSL certificates are unavailable.
 #
 # SIAB_DISABLE_SSL and SIAB_CERT_DIR are mutually exclusive options.
-#
+
 # Add this option to SIAB_OPTS if you don't want SSL support.
 SIAB_DISABLE_SSL="--disable-ssl"
 
@@ -65,10 +65,13 @@ SIAB_GROUP="shellinaboxd"
 # Default service to launch
 SIAB_SERVICE="/:LOGIN"
 
+# SIAB log file.
+SIAB_LOGFILE="/var/log/shellinabox.log"
+
 # Do not add both SIAB_CSS_DIR or SIAB_CERT_DIR to SIAB_OPTS.
 
 # Default setup turns off SSL.
-SIAB_OPTS="${SIAB_DISABLE_SSL} --port=${SIAB_HTTP_PORT} --user=${SIAB_USER} 
--group=${SIAB_GROUP} --service=${SIAB_SERVICE}"
+SIAB_OPTS="${SIAB_DISABLE_SSL} --port=${SIAB_HTTP_PORT} --user=${SIAB_USER} 
--group=${SIAB_GROUP} --service=${SIAB_SERVICE} --verbose"
 
 # Uncomment this line to activate SSL.
 # SIAB_OPTS="--cert=${SIAB_CERT_DIR} --port=${SIAB_HTTP_PORT} 
--user=${SIAB_USER} --group=${SIAB_GROUP} --service=${SIAB_SERVICE}"

diff --git a/www-misc/shellinabox/files/shellinaboxd.init 
b/www-misc/shellinabox/files/shellinaboxd.init
index 657a137a5c6..11c50d43791 100644
--- a/www-misc/shellinabox/files/shellinaboxd.init
+++ b/www-misc/shellinabox/files/shellinaboxd.init
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 my_daemon="shellinaboxd"
@@ -33,7 +33,7 @@ start_pre() {
             SIAB_CSS_FILES+=("\"${_NAME}\":-${_CSS}")
         done
 
-        # The 1st one, which the default one, must be turned on using a + sign.
+        # The 1st one, which is the default one, must be turned on using the + 
sign.
         SIAB_CSS_FILES[0]=$(sed 's#:-#:+#' <<< ${SIAB_CSS_FILES[0]})
 
         command_args="${command_args} --user-css=$(my_join , 
"${SIAB_CSS_FILES[@]}")"
@@ -50,6 +50,7 @@ start() {
         --pidfile ${pidfile} \
         --make-pidfile \
         --exec ${command} \
+        -1 ${SIAB_LOGFILE} -2 ${SIAB_LOGFILE} \
         -- ${command_args}
     eend $?
 }

diff --git a/www-misc/shellinabox/shellinabox-2.20-r1.ebuild 
b/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
index 402d2b3c081..0fd76e1f2e6 100644
--- a/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
+++ b/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
@@ -66,7 +66,7 @@ src_install() {
        newinitd "${FILESDIR}/${SIAB_DAEMON}.init" "${SIAB_DAEMON}"
        newconfd "${FILESDIR}/${SIAB_DAEMON}.conf" "${SIAB_DAEMON}"
 
-       # Install systemd unit files
+       # Install systemd unit file.
        systemd_dounit "${FILESDIR}"/shellinaboxd.service
 
        # Install CSS files.

Reply via email to