diff options
Diffstat (limited to '')
-rwxr-xr-x | lib/container/status | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/container/status b/lib/container/status index 9c5ab20..a4b49e1 100755 --- a/lib/container/status +++ b/lib/container/status @@ -1,6 +1,5 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers # Copyright (C) 2016 Simon Spöehel <simon.spoehel@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ @@ -20,10 +19,12 @@ set -e +PROJECT="open-infrastructure" +PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/container-tools/config" -HOOKS="/etc/container-tools/hooks" +CONFIG="/etc/${PROJECT}/${PROGRAM}/config" +HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" MACHINES="/var/lib/machines" Parameters () @@ -64,7 +65,7 @@ Parameters () Usage () { - echo "Usage: container ${COMMAND} -n|--name NAME" >&2 + echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME" >&2 exit 1 } @@ -91,7 +92,7 @@ do done # Run -systemctl status container@${NAME}.service --full +systemctl status ${PROGRAM}@${NAME}.service --full # Post hooks for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" |