Starting and stopping services
This commit is contained in:
parent
a0972bab26
commit
75cf4d62d6
|
@ -313,6 +313,10 @@ function reconfigure_matrix {
|
|||
}
|
||||
|
||||
function upgrade_matrix {
|
||||
systemctl stop turn
|
||||
systemctl stop matrix
|
||||
systemctl stop sydent
|
||||
|
||||
function_check set_repo_commit
|
||||
set_repo_commit /etc/matrix "matrix commit" "$MATRIX_COMMIT" $MATRIX_REPO
|
||||
cd /etc/matrix
|
||||
|
@ -328,14 +332,18 @@ function upgrade_matrix {
|
|||
chown -R matrix:matrix /etc/sydent
|
||||
chown -R matrix:matrix $MATRIX_DATA_DIR
|
||||
|
||||
systemctl restart turn
|
||||
systemctl restart matrix
|
||||
systemctl start turn
|
||||
systemctl start matrix
|
||||
systemctl start sydent
|
||||
}
|
||||
|
||||
function backup_local_matrix {
|
||||
source_directory=/etc/matrix
|
||||
if [ -d $source_directory ]; then
|
||||
systemctl stop turn
|
||||
systemctl stop matrix
|
||||
systemctl stop sydent
|
||||
|
||||
function_check backup_directory_to_usb
|
||||
backup_directory_to_usb $source_directory matrix
|
||||
source_directory=$MATRIX_DATA_DIR
|
||||
|
@ -346,13 +354,18 @@ function backup_local_matrix {
|
|||
if [ -d $source_directory ]; then
|
||||
backup_directory_to_usb $source_directory matrixid
|
||||
fi
|
||||
|
||||
systemctl start turn
|
||||
systemctl start matrix
|
||||
systemctl start sydent
|
||||
fi
|
||||
}
|
||||
|
||||
function restore_local_matrix {
|
||||
if [ -d /etc/matrix ]; then
|
||||
systemctl stop turn
|
||||
systemctl stop matrix
|
||||
systemctl stop sydent
|
||||
|
||||
temp_restore_dir=/root/tempmatrix
|
||||
function_check restore_directory_from_usb
|
||||
|
@ -388,14 +401,19 @@ function restore_local_matrix {
|
|||
rm -rf $temp_restore_dir
|
||||
chown -R matrix:matrix /etc/sydent
|
||||
|
||||
systemctl start turn
|
||||
systemctl start matrix
|
||||
systemctl start sydent
|
||||
fi
|
||||
}
|
||||
|
||||
function backup_remote_matrix {
|
||||
source_directory=/etc/matrix
|
||||
if [ -d $source_directory ]; then
|
||||
systemctl stop turn
|
||||
systemctl stop matrix
|
||||
systemctl stop sydent
|
||||
|
||||
function_check backup_directory_to_friend
|
||||
backup_directory_to_friend $source_directory matrix
|
||||
source_directory=$MATRIX_DATA_DIR
|
||||
|
@ -406,13 +424,18 @@ function backup_remote_matrix {
|
|||
if [ -d $source_directory ]; then
|
||||
backup_directory_to_friend $source_directory matrixid
|
||||
fi
|
||||
|
||||
systemctl start turn
|
||||
systemctl start matrix
|
||||
systemctl start sydent
|
||||
fi
|
||||
}
|
||||
|
||||
function restore_remote_matrix {
|
||||
if [ -d /etc/matrix ]; then
|
||||
systemctl stop turn
|
||||
systemctl stop matrix
|
||||
systemctl stop sydent
|
||||
|
||||
temp_restore_dir=/root/tempmatrix
|
||||
function_check restore_directory_from_friend
|
||||
|
@ -442,7 +465,9 @@ function restore_remote_matrix {
|
|||
rm -rf $temp_restore_dir
|
||||
chown -R matrix:matrix /etc/sydent
|
||||
|
||||
systemctl start turn
|
||||
systemctl start matrix
|
||||
systemctl start sydent
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue