www-misc/shellinabox: instruct daemon to log to a file.
authorPatrice Clement <monsieurp@gentoo.org>
Wed, 11 Dec 2019 20:34:27 +0000 (21:34 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Wed, 11 Dec 2019 20:39:57 +0000 (21:39 +0100)
Closes: https://bugs.gentoo.org/702182
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
www-misc/shellinabox/files/shellinaboxd.conf
www-misc/shellinabox/files/shellinaboxd.init
www-misc/shellinabox/shellinabox-2.20-r1.ebuild

index 3c34ab08f5e9012e8b88befb3b40d2118cfcd3f7..d80ecd0250d20a0a5d271fd0f0a7ee7f4220b6eb 100644 (file)
@@ -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}"
index 657a137a5c6b13732c7de97baa33c29940298934..11c50d437914ed8893af17180f14e747779cf32e 100644 (file)
@@ -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 $?
 }
index 402d2b3c081b8e52eeaa73c7bcdf3f740ada6910..0fd76e1f2e612d392a53e9461b911f3c15dfc87f 100644 (file)
@@ -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.