Addings seqs for upgrade, version and restart
This commit is contained in:
@@ -120,9 +120,44 @@ SyslogIdentifier=synapse
|
||||
[Install]
|
||||
WantedBy=multi-user.target"
|
||||
|
||||
step_15_info() { echo "Create new user"; }
|
||||
step_15_alias() { ALIAS="newuser"; }
|
||||
step_15() {
|
||||
step_10_info() { echo "Upgrade $toolName installation at $toolDir"; }
|
||||
step_10_alias() { ALIAS="upgrade"; }
|
||||
step_10() {
|
||||
echo " [I] Upgrading $toolName"
|
||||
exe source "${toolDir}/env/bin/activate"
|
||||
exe pip install --upgrade pip
|
||||
exe pip install --upgrade matrix-synapse
|
||||
saveReturn $?
|
||||
exe deactivate
|
||||
endReturn "Error upgrading $toolName"
|
||||
|
||||
echo " [I] Restarting $toolName"
|
||||
step restart
|
||||
echo " [I] New Version:"
|
||||
exe sleep 2
|
||||
step version
|
||||
}
|
||||
|
||||
step_12_info() { echo "Restart $toolName systemd service"; }
|
||||
step_12_alias() { ALIAS="restart"; }
|
||||
step_12() {
|
||||
exe service matrix-synapse restart
|
||||
}
|
||||
|
||||
step_14_info() { echo "Show $toolName version running at [IP]:8008"; }
|
||||
step_14_alias() { ALIAS="version"; }
|
||||
step_14() {
|
||||
local synapseIP=localhost
|
||||
shift
|
||||
if [ ! -z $1 ]; then
|
||||
synapseIP="$1"
|
||||
fi
|
||||
exe curl http://${synapseIP}:8008/_synapse/admin/v1/server_version
|
||||
}
|
||||
|
||||
step_16_info() { echo "Create new user"; }
|
||||
step_16_alias() { ALIAS="newuser"; }
|
||||
step_16() {
|
||||
exe /opt/synapse/env/bin/register_new_matrix_user -c "$toolDir/homeserver.yaml" $toolUrl
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user