summaryrefslogtreecommitdiff
path: root/rel/pleroma_ctl
blob: 2e709a8a67c34ecc3e855d2ec37fb1420dbffc05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# XXX: This should be removed when elixir's releases get custom command support
if [ -z "$1" ] || [ "$1" = "help" ]; then
  echo "Usage: $(basename "$0") COMMAND [ARGS]

    The known commands are:

        create                     Create database schema (needs to be executed only once)
        migrate                    Execute database migrations (needs to be done after updates)
        rollback [VERSION]         Rollback database migrations (needs to be done before downgrading)

    and any mix tasks under Pleroma namespace, for example \`mix pleroma.user COMMAND\` is
    equivalent to \`$(basename "$0") user COMMAND\`
"
else
  SCRIPT=$(readlink -f "$0")
  SCRIPTPATH=$(dirname "$SCRIPT")
  "$SCRIPTPATH"/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")'
fi