forked from michael.heier/citadel-core
07aa73b59e
add commands for: - Show status for all services - Run a command inside a (app) container - Switch branch / update channel - Switch Bitcoin/Electrum/Lightning implementation - app commands - debug command - Fix update / backup / starting stuck - Edit node configs (Bitcoin Core, LND) - Edit app configs (Nextcloud etc.) - Memory usage / System info - Start - Stop - Restart - Reboot - Shutdown - List all installed apps & services - Logs - Version - Help
12 lines
249 B
Bash
12 lines
249 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
trim() {
|
|
local var="$*"
|
|
# remove leading whitespace characters
|
|
var="${var#"${var%%[![:space:]]*}"}"
|
|
# remove trailing whitespace characters
|
|
var="${var%"${var##*[![:space:]]}"}"
|
|
printf '%s' "$var"
|
|
}
|