runtipictl improvements
+ START_DIR env + Usage output + dockge command
This commit is contained in:
parent
b415cbd613
commit
1c7f324312
|
@ -7,7 +7,7 @@ jlmkr () {
|
||||||
JAIL_UID=${JAIL_UID:-${UID}}
|
JAIL_UID=${JAIL_UID:-${UID}}
|
||||||
|
|
||||||
jlmkr-exec () {
|
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}"
|
printf '\"%s\" ' "${@:2}"
|
||||||
)"}
|
)"}
|
||||||
|
|
||||||
|
@ -68,21 +68,30 @@ case "${1}" in
|
||||||
dcoapp)
|
dcoapp)
|
||||||
runtipi-app-docker-compose "${@:2}"
|
runtipi-app-docker-compose "${@:2}"
|
||||||
;;
|
;;
|
||||||
|
dockge)
|
||||||
|
START_DIR=/srv/dockge/stacks/${2:?Must supply stack name} jlmkr-exec docker compose "${@:3}"
|
||||||
|
;;
|
||||||
setup)
|
setup)
|
||||||
ln -s "${BASH_SOURCE[0]}" "$HOME/.local/bin/"
|
ln -s $2 "$(cd "$(dirname "$0")" && pwd)/$(basename "$0")" "$HOME/.local/bin/"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf '%s\n' \
|
printf '%s %-12s %s\n' \
|
||||||
"Usage:" \
|
"" "" ""\
|
||||||
"" \
|
"Usage:" "" ""\
|
||||||
"cli" \
|
" $(basename "$0") <command> [args...]" "" ""\
|
||||||
"log" \
|
"" "" "" \
|
||||||
"start" \
|
"Available commands:" "" ""\
|
||||||
"full-start" \
|
"" "" "" \
|
||||||
"exec" \
|
"" "cli" "runtipi-cli" \
|
||||||
"docker" \
|
"" "dcoapp" "docker compose for runtipi apps" \
|
||||||
"dcoapp" \
|
"" "docker" "docker" \
|
||||||
"setup"
|
"" "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
|
esac
|
||||||
|
|
Loading…
Reference in New Issue