dotfiles/.local/bin/server/zulips

20 lines
569 B
Text
Raw Normal View History

2022-12-12 13:45:32 +01:00
#!/bin/sh -e
2022-07-06 08:56:40 +02:00
# Execute commands on a zulip server
2023-04-07 19:31:59 +02:00
# https://zulip.readthedocs.io/en/latest/production/management-commands.html
2022-07-06 08:56:40 +02:00
zulipdepl="/home/zulip/deployments/current"
2022-12-12 13:45:32 +01:00
case $1 in
(upgrade)
cd /tmp
curl -fLO https://download.zulip.com/server/zulip-server-latest.tar.gz
sudo "$zulipdepl/scripts/upgrade-zulip" zulip-server-latest.tar.gz;;
(status) sudo supervisorctl status;;
(*)
sudo su zulip -c "$(
scr="$zulipdepl/scripts/$1"
if test -f "$scr"
then shift && echo "$scr $@"
else echo "$zulipdepl/manage.py $@"
fi
)";;
esac