pleroma_ctl (781B)
1 #!/bin/sh 2 # XXX: This should be removed when elixir's releases get custom command support 3 if [ -z "$1" ] || [ "$1" = "help" ]; then 4 echo "Usage: $(basename "$0") COMMAND [ARGS] 5 6 The known commands are: 7 8 create Create database schema (needs to be executed only once) 9 migrate Execute database migrations (needs to be done after updates) 10 rollback [VERSION] Rollback database migrations (needs to be done before downgrading) 11 12 and any mix tasks under Pleroma namespace, for example \`mix pleroma.user COMMAND\` is 13 equivalent to \`$(basename "$0") user COMMAND\` 14 " 15 else 16 SCRIPT=$(readlink -f "$0") 17 SCRIPTPATH=$(dirname "$SCRIPT") 18 "$SCRIPTPATH"/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")' 19 fi