add configurable exit codes to some commands (#55)

This commit is contained in:
2022-04-01 18:30:11 +03:00
committed by GitHub
parent 06ec16ac77
commit e909e4f570
22 changed files with 279 additions and 28 deletions

View File

@ -36,6 +36,7 @@ if [ -n "$AHRIMAN_API_USER" ]; then
# python getpass does not read from stdin
# see thread https://mail.python.org/pipermail/python-dev/2008-February/077235.html
# WARNING with debug mode password will be put to stdout
ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" user-list --error-on-empty "$AHRIMAN_API_USER" > /dev/null ||
ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" user-add --as-service --role write --secure "$AHRIMAN_API_USER" -p "$(openssl rand -base64 20)"
fi