bin/server/zulip: add custom commands

This commit is contained in:
xeruf 2022-12-12 13:45:32 +01:00
parent de3386567a
commit 49818385ec
3 changed files with 17 additions and 10 deletions

View File

@ -5,7 +5,7 @@ colors:
title: blue title: blue
default_hour: 0 default_hour: 0
default_minute: 0 default_minute: 0
editor: /home/janekf/.local/bin/scripts/emacstty +99999 editor: {{ env.HOME }}/.local/bin/scripts/emacstty +99999
encrypt: false encrypt: false
highlight: true highlight: true
indent_character: '|' indent_character: '|'

View File

@ -1,4 +1,3 @@
$XDG_CONFIG_HOME/jrnl
$XDG_CONFIG_HOME/yadm $XDG_CONFIG_HOME/yadm
$XDG_CONFIG_HOME/doom $XDG_CONFIG_HOME/doom
$XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/git

View File

@ -1,10 +1,18 @@
#!/bin/sh #!/bin/sh -e
# Execute commands on a zulip server # Execute commands on a zulip server
zulipdepl="/home/zulip/deployments/current" zulipdepl="/home/zulip/deployments/current"
sudo su zulip -c "$( case $1 in
scr="$zulipdepl/scripts/$1" (upgrade)
if test -f "$scr" cd /tmp
then shift && echo "$scr $@" curl -fLO https://download.zulip.com/server/zulip-server-latest.tar.gz
else echo "$zulipdepl/manage.py $@" sudo "$zulipdepl/scripts/upgrade-zulip" zulip-server-latest.tar.gz;;
fi (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