summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/container20
1 files changed, 14 insertions, 6 deletions
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