forked from ports/contrib
matrix-synapse: updated service file
This commit is contained in:
parent
6deec99813
commit
03c1abf214
@ -1,6 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3/UcjG3pqclEE6PJDl0oG52R3E1IUqszBRQCUbk++UGKJI1Iu26BKeaBzWzt8B/eu3cRAU4qROf0hHhb+CZ5TgA=
|
||||
SHA256 (Pkgfile) = f8ba1f6efbfab2a6b8f68a27ab490bec008afc5a1ffe6d9e187913d30f2d4e15
|
||||
RWSagIOpLGJF39ZrQd7o+VuVrTb4yU4bixYPMdZ+yJUvq87rgTmkgXFrko6QbPi+olINFP+Z6FerGsfJ9a/87sKFUVZUGtCkjgg=
|
||||
SHA256 (Pkgfile) = ee8d1c68232d092807010241e48f9f71581f4915b825a37e641bdf6f8130f307
|
||||
SHA256 (.footprint) = 9640ec988495569582ba021f6caffd4f8ec005a2bd6dd6f87eab662d34888038
|
||||
SHA256 (matrix-synapse-1.91.0.tar.gz) = 37ce6ce59b31b284910eb39ed4ba240638b2e54bc2e8b1d45283e28af87f5a68
|
||||
SHA256 (synapse.service) = 6507699b1b562cb7fe449e2c3868847794fb38bd6a58e6ddd7e72af55f38abc3
|
||||
SHA256 (synapse.service) = 57e311c0d71c4c72328e99ed26ec44f70febab514f3bd6981d7c19b7f2f8e828
|
||||
|
@ -2,11 +2,11 @@
|
||||
# URL: https://github.com/matrix-org/synapse
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: python3-bcrypt python3-bleach python3-ijson python3-immutabledict python3-matrix-common python3-msgpack python3-netaddr python3-phonenumbers python3-pillow python3-prometheus_client python3-pydantic python3-pymacaroons python3-pysaml2 python3-signedjson python3-sortedcontainers python3-treq
|
||||
# Optional: python3-hiredis python3-lxml python3-psutil python3-psycopg2 python3-pyjwt python3-txredisapi psycopg2
|
||||
# Optional: python3-hiredis python3-lxml python3-psutil python3-psycopg2 python3-pyjwt python3-txredisapi
|
||||
|
||||
name=matrix-synapse
|
||||
version=1.91.0
|
||||
release=1
|
||||
release=2
|
||||
source=(https://github.com/matrix-org/synapse/archive/v$version/$name-$version.tar.gz
|
||||
synapse.service)
|
||||
|
||||
|
@ -1,50 +1,51 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# /etc/rc.d/synapse: start/stop synapse daemon
|
||||
#
|
||||
|
||||
SUDO=/usr/bin/sudo
|
||||
error() {
|
||||
printf "\e[31m%s\e[0m\n" "[ERRO] $*"
|
||||
}
|
||||
|
||||
if [[ -e /usr/bin/doas ]]; then
|
||||
SUDO=/usr/bin/doas
|
||||
elif [[ -e /usr/bin/sudo ]]; then
|
||||
SUDO=/usr/bin/sudo
|
||||
else
|
||||
error "Needs either core/sudo or contrib/opendoas installed and configured!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PID=/var/run/homeserver.pid
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
# sanity checks
|
||||
if [ ! -e /etc/synapse/homeserver.yaml ]; then
|
||||
echo "Please read README.md from this port and create a homeserver.yaml file first"
|
||||
printf "\e[31m%s\e[0m\n" "[ERRO] Needs either core/sudo or contrib/opendoas installed and configured!"
|
||||
error "Please read README.md from this port and create a homeserver.yaml file first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
if [ "$(stat -c '%a' /var/run)" != "777" ]; then
|
||||
echo "rundir needs to be world writeable for synapse to be able to write to it"
|
||||
exit 1
|
||||
fi
|
||||
[[ ! -e /run/synapse ]] && install -g synapse -o synapse -d /run/synapse
|
||||
|
||||
$SUDO -u synapse /usr/bin/synctl start /etc/synapse/homeserver.yaml
|
||||
;;
|
||||
$SUDO -u synapse /usr/bin/synctl start /etc/synapse/homeserver.yaml ;;
|
||||
stop)
|
||||
/usr/bin/synctl stop /etc/synapse/homeserver.yaml
|
||||
;;
|
||||
/usr/bin/synctl stop /etc/synapse/homeserver.yaml ;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
$0 start ;;
|
||||
status)
|
||||
if [ -e $PID ]
|
||||
then
|
||||
if [ -d "/proc/$(cat $PID)" ]
|
||||
then
|
||||
if [ -e $PID ]; then
|
||||
if [ -d "/proc/$(cat $PID)" ]; then
|
||||
echo "synapse server is running with pid $(cat $PID)"
|
||||
else
|
||||
echo "pidfile $PID exists, but synapse server is not running"
|
||||
echo "pidfile $PID exists, but synapse server is not running"
|
||||
fi
|
||||
else
|
||||
echo "synapse server is not running"
|
||||
fi
|
||||
;;
|
||||
fi ;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
echo "usage: $0 [start|stop|restart|status]" ;;
|
||||
esac
|
||||
|
||||
# End of file
|
||||
|
Loading…
x
Reference in New Issue
Block a user