Fix handling of admin commands
See https://github.com/Coop-Cloud/peertube/issues/1. See coop-cloud/abra#200.
This commit is contained in:
parent
406afdb8cf
commit
04408f007a
28
abra.sh
28
abra.sh
@ -1,24 +1,26 @@
|
|||||||
|
# shellcheck disable=SC2034,SC2145
|
||||||
|
|
||||||
export NGINX_CONFIG_VERSION=v2
|
export NGINX_CONFIG_VERSION=v2
|
||||||
export APP_ENTRYPOINT_VERSION=v1
|
export APP_ENTRYPOINT_VERSION=v1
|
||||||
|
|
||||||
sub_npm() {
|
sub_npm() {
|
||||||
export NODE_CONFIG_DIR=/config
|
|
||||||
export NODE_ENV=production
|
|
||||||
export PEERTUBE_DB_PASSWORD=$(cat /run/secrets/db_password)
|
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
abra__service_="app"
|
abra__service_="app"
|
||||||
|
|
||||||
sub_app_run npm run "$@"
|
ARGS="-e NODE_CONFIG_DIR=/config -e NODE_ENV=production"
|
||||||
|
|
||||||
|
sub_app_run bash -c "\
|
||||||
|
export PEERTUBE_DB_PASSWORD=\$(cat /run/secrets/db_password) && \
|
||||||
|
npm run \"$@\" \
|
||||||
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_prune() {
|
sub_prune() {
|
||||||
info "Pruning storage"
|
sub_npm prune-storage
|
||||||
info "See https://docs.joinpeertube.org/maintain-tools?id=prune-storagejs for more"
|
unsilence
|
||||||
silence
|
success "Storage pruned - don't forget to restart your Peertube instance!"
|
||||||
|
}
|
||||||
sub_npm "prune-storage"
|
|
||||||
|
sub_regen_thumb() {
|
||||||
|
sub_npm regenerate-thumbnails
|
||||||
unsilence
|
unsilence
|
||||||
success "Storage pruned!"
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user