diff --git a/_bin/runtipictl b/_bin/runtipictl index 6e6dda4..c7476e3 100755 --- a/_bin/runtipictl +++ b/_bin/runtipictl @@ -7,7 +7,7 @@ jlmkr () { JAIL_UID=${JAIL_UID:-${UID}} jlmkr-exec () { - local cli='cd /srv/runtipi; '"${1:?Must supply command} "${2:+"$( + local cli="cd ${START_DIR:-/srv/runtipi}; ${1:?Must supply command} "${2:+"$( printf '\"%s\" ' "${@:2}" )"} @@ -68,21 +68,30 @@ case "${1}" in dcoapp) runtipi-app-docker-compose "${@:2}" ;; + dockge) + START_DIR=/srv/dockge/stacks/${2:?Must supply stack name} jlmkr-exec docker compose "${@:3}" + ;; setup) - ln -s "${BASH_SOURCE[0]}" "$HOME/.local/bin/" + ln -s $2 "$(cd "$(dirname "$0")" && pwd)/$(basename "$0")" "$HOME/.local/bin/" ;; *) - printf '%s\n' \ - "Usage:" \ - "" \ - "cli" \ - "log" \ - "start" \ - "full-start" \ - "exec" \ - "docker" \ - "dcoapp" \ - "setup" + printf '%s %-12s %s\n' \ + "" "" ""\ + "Usage:" "" ""\ + " $(basename "$0") [args...]" "" ""\ + "" "" "" \ + "Available commands:" "" ""\ + "" "" "" \ + "" "cli" "runtipi-cli" \ + "" "dcoapp" "docker compose for runtipi apps" \ + "" "docker" "docker" \ + "" "dockge" "dokcer compose for dockge stacks" \ + "" "exec" "execute within the shell, START_DIR env applies" \ + "" "full-start" "start runtipi jail, following with starting runtipi" \ + "" "log" "runtipi docker stack logs" \ + "" "start" "start runtipi" \ + "" "" "" \ + "" "setup" "setup runtipictl in user's .local/bin dir" ;; esac