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
86d1c1a7
Commit
86d1c1a7
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Set database password on koel restore
parent
50c64e26
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-koel
+19
-8
19 additions, 8 deletions
src/freedombone-app-koel
with
19 additions
and
8 deletions
src/freedombone-app-koel
+
19
−
8
View file @
86d1c1a7
...
...
@@ -323,7 +323,7 @@ function backup_local_koel {
source_directory
=
/var/www/
${
KOEL_DOMAIN_NAME
}
/htdocs
if
[
-d
$source_directory
]
;
then
systemctl stop ko
a
l
systemctl stop ko
e
l
dest_directory
=
koel
function_check suspend_site
...
...
@@ -338,7 +338,7 @@ function backup_local_koel {
function_check restart_site
restart_site
systemctl start ko
a
l
systemctl start ko
e
l
fi
}
...
...
@@ -349,7 +349,7 @@ function restore_local_koel {
KOEL_DOMAIN_NAME
=
$(
get_completion_param
"koel domain"
)
if
[
$KOEL_DOMAIN_NAME
]
;
then
echo
$"Restoring koel"
systemctl stop ko
a
l
systemctl stop ko
e
l
temp_restore_dir
=
/root/tempkoel
koel_dir
=
/var/www/
${
KOEL_DOMAIN_NAME
}
/htdocs
...
...
@@ -361,7 +361,13 @@ function restore_local_koel {
if
[
-d
$temp_restore_dir
]
;
then
rm
-rf
$temp_restore_dir
fi
systemctl start koal
MARIADB_PASSWORD
=
$(
${
PROJECT_NAME
}
-pass
-u
root
-a
mariadb
)
cd
/var/www/
$KOEL_DOMAIN_NAME
/htdocs
sed
-i
"s|DB_PASSWORD=.*|DB_PASSWORD=
$MARIADB_PASSWORD
|g"
.env
MARIADB_PASSWORD
=
systemctl start koel
fi
}
...
...
@@ -370,7 +376,7 @@ function backup_remote_koel {
KOEL_DOMAIN_NAME
=
$(
get_completion_param
"koel domain"
)
temp_backup_dir
=
/var/www/
${
KOEL_DOMAIN_NAME
}
/htdocs
if
[
-d
$temp_backup_dir
]
;
then
systemctl stop ko
a
l
systemctl stop ko
e
l
function_check suspend_site
suspend_site
${
KOEL_DOMAIN_NAME
}
...
...
@@ -386,7 +392,7 @@ function backup_remote_koel {
function_check restart_site
restart_site
systemctl start ko
a
l
systemctl start ko
e
l
else
echo
$"koel domain specified but not found in
${
temp_backup_dir
}
"
fi
...
...
@@ -397,7 +403,7 @@ function restore_remote_koel {
if
grep
-q
"koel domain"
$COMPLETION_FILE
;
then
echo
$"Restoring koel"
systemctl stop ko
a
l
systemctl stop ko
e
l
KOEL_DOMAIN_NAME
=
$(
get_completion_param
"koel domain"
)
...
...
@@ -410,7 +416,12 @@ function restore_remote_koel {
rm
-rf
/root/tempkoel
fi
systemctl start koal
MARIADB_PASSWORD
=
$(
${
PROJECT_NAME
}
-pass
-u
root
-a
mariadb
)
cd
/var/www/
$KOEL_DOMAIN_NAME
/htdocs
sed
-i
"s|DB_PASSWORD=.*|DB_PASSWORD=
$MARIADB_PASSWORD
|g"
.env
MARIADB_PASSWORD
=
systemctl start koel
echo
$"Restore of koel complete"
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