Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
75cf4d62
Commit
75cf4d62
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Starting and stopping services
parent
a0972bab
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-matrix
+27
-2
27 additions, 2 deletions
src/freedombone-app-matrix
with
27 additions
and
2 deletions
src/freedombone-app-matrix
+
27
−
2
View file @
75cf4d62
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment