Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/rel/pleroma_ctl b/rel/pleroma_ctl
index 2e709a8a6..ac7339762 100755
--- a/rel/pleroma_ctl
+++ b/rel/pleroma_ctl
@@ -1,19 +1,26 @@
#!/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]
+ 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\`
+
+ By default pleroma_ctl will try calling into a running instance to execute non migration-related commands,
+ if for some reason this is undesired, set PLEROMA_CTL_RPC_DISABLED environment variable
"
else
- SCRIPT=$(readlink -f "$0")
- SCRIPTPATH=$(dirname "$SCRIPT")
- "$SCRIPTPATH"/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")'
+ SCRIPT=$(readlink -f "$0")
+ SCRIPTPATH=$(dirname "$SCRIPT")
+ if [ "$1" = "migrate" ] || [ "$1" = "rollback" ] || [ "$1" = "create" ] || [ -n "$PLEROMA_CTL_RPC_DISABLED" ]; then
+ "$SCRIPTPATH"/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")'
+ else
+ "$SCRIPTPATH"/pleroma rpc 'Pleroma.ReleaseTasks.run("'"$*"'")'
+ fi
fi

File Metadata

Mime Type
text/x-diff
Expires
Wed, Nov 18, 10:26 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1840752
Default Alt Text
(1 KB)

Event Timeline