From 61e8b3ad09199946caa46112270d13f24192de83 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 6 Jul 2022 08:56:40 +0200 Subject: [PATCH] bin/zulip: add --- .local/bin/scripts/zulip | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .local/bin/scripts/zulip diff --git a/.local/bin/scripts/zulip b/.local/bin/scripts/zulip new file mode 100755 index 0000000..0a4fb3c --- /dev/null +++ b/.local/bin/scripts/zulip @@ -0,0 +1,10 @@ +#!/bin/sh +# Execute commands on a zulip server +zulipdepl="/home/zulip/deployments/current" +sudo su zulip -c "$( + scr="$zulipdepl/scripts/$1" + if test -f "$scr" + then shift && echo "$scr $@" + else echo "$zulipdepl/manage.py $@" + fi +)"