fix shellcheck

This commit is contained in:
adam committed 2026-09-28 17:05:12 +00:00
1 parent 910b438686
commit 47808ffa17
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -567,7 +567,8 @@ command=$1; shift
case $command in case $command in
-h|--help|help) usage 0 ;; -h|--help|help) usage 0 ;;
-V|--version|version) -V|--version|version)
if [[ $TERRACTL_VERSION == "@"VERSION"@" ]]; then echo "terractl (development copy)" # The build replaces the placeholder with a version number, which never contains '@'
if [[ $TERRACTL_VERSION == *@* ]]; then echo "terractl (development copy)"
else echo "terractl $TERRACTL_VERSION"; fi else echo "terractl $TERRACTL_VERSION"; fi
exit 0 ;; exit 0 ;;
list) cmd_list; exit ;; list) cmd_list; exit ;;
+1 -1
View File
@@ -10,7 +10,7 @@ case "$1" in
units=$(systemctl list-units --plain --no-legend --all 'terraria@*.service' | awk '{print $1}') units=$(systemctl list-units --plain --no-legend --all 'terraria@*.service' | awk '{print $1}')
if [ -n "$units" ]; then if [ -n "$units" ]; then
echo "Stopping Terraria instances: $units" echo "Stopping Terraria instances: $units"
systemctl stop $units || true systemctl stop "$units" || true
fi fi
fi fi
;; ;;