From 55019ff4757681593a80775526029c2ff1907f5c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 27 Jul 2021 02:58:35 +0200 Subject: Adding upstream version 20210727. Signed-off-by: Daniel Baumann --- bin/container | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/container b/bin/container index e284c23..172caec 100755 --- a/bin/container +++ b/bin/container @@ -32,6 +32,8 @@ if [ -z "${PARAMETER}" ] then echo "Usage: ${PROGRAM} COMMAND [OPTIONS]" >&2 echo "Usage: ${PROGRAM} COMMAND1,COMMAND2,... [COMMON_OPTIONS]" >&2 + echo + echo "See ${PROGRAM}(1) and ${PROJECT}(7) for more information." exit 1 fi @@ -40,9 +42,9 @@ COMMANDS="${1}" # Options shift 1 -OPTIONS="${@}" +OPTIONS="${*}" -for COMMAND in $(echo ${COMMANDS} | sed -e 's|,| |g') +for COMMAND in $(echo "${COMMANDS}" | sed -e 's|,| |g') do if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ] then @@ -65,7 +67,7 @@ do OPTIONS="$(echo "${OPTIONS}" | sed -e 's|--no-notification||')" else case "${COMMAND}" in - build|b|move|mv|remove|rm|restart|rt|start|s|stop|t) + build|b|get|g|move|mv|remove|rm|restart|rt|start|s|stop|t|update|u) if [ -z "${CONTAINER_USER}" ] then CONTAINER_USER="${SUDO_USER:-${USER}}" @@ -78,15 +80,21 @@ do echo "${DATE} ${HOST} ${CONTAINER_USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${SOFTWARE}/${PROGRAM}.log" # irc - if [ -e /usr/bin/irk ] && [ -e "/etc/${SOFTWARE}.conf" ] + if [ -e /usr/bin/irk ] then - . "/etc/${SOFTWARE}.conf" + for FILE in "/etc/${SOFTWARE}/${PROGRAM}.conf" "/etc/${SOFTWARE}/${PROGRAM}.conf.d"/*.conf + do + if [ -e "${FILE}" ] + then + . "${FILE}" + fi + done if [ -n "${IRK_TARGETS}" ] then for TARGET in ${IRK_TARGETS} do - irk ${TARGET} "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}" + irk "${TARGET}" "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}" done fi fi -- cgit v1.2.3