2022-12-12 12:45:32 +00:00
|
|
|
#!/bin/sh -e
|
2022-07-06 06:56:40 +00:00
|
|
|
# Execute commands on a zulip server
|
|
|
|
zulipdepl="/home/zulip/deployments/current"
|
2022-12-12 12:45:32 +00: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
|