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
f863c218
Commit
f863c218
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Set database password on gogs restore
parent
3fc4f40c
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-gogs
+13
-1
13 additions, 1 deletion
src/freedombone-app-gogs
with
13 additions
and
1 deletion
src/freedombone-app-gogs
+
13
−
1
View file @
f863c218
...
...
@@ -13,7 +13,7 @@
# License
# =======
#
# Copyright (C) 2014-201
6
Bob Mottram <bob@freedombone.net>
# Copyright (C) 2014-201
7
Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -279,6 +279,12 @@ function restore_local_gogs {
rm
-rf
${
temp_restore_dir
}
ssh
chown
-R
${
GOGS_USERNAME
}
:
${
GOGS_USERNAME
}
/home/
${
GOGS_USERNAME
}
fi
GOGS_CONFIG_PATH
=
/home/
${
GOGS_USERNAME
}
/custom/conf
GOGS_CONFIG_FILE
=
${
GOGS_CONFIG_PATH
}
/app.ini
MARIADB_PASSWORD
=
$(
${
PROJECT_NAME
}
-pass
-u
root
-a
mariadb
)
sed
-i
"s|PASSWD =.*|PASSWD =
$MARIADB_PASSWORD
|g"
${
GOGS_CONFIG_FILE
}
MARIADB_PASSWORD
=
fi
}
...
...
@@ -349,6 +355,12 @@ function restore_remote_gogs {
chown
-R
${
GOGS_USERNAME
}
:
${
GOGS_USERNAME
}
/home/
${
GOGS_USERNAME
}
echo
$"Restore of Gogs complete"
fi
GOGS_CONFIG_PATH
=
/home/
${
GOGS_USERNAME
}
/custom/conf
GOGS_CONFIG_FILE
=
${
GOGS_CONFIG_PATH
}
/app.ini
MARIADB_PASSWORD
=
$(
${
PROJECT_NAME
}
-pass
-u
root
-a
mariadb
)
sed
-i
"s|PASSWD =.*|PASSWD =
$MARIADB_PASSWORD
|g"
${
GOGS_CONFIG_FILE
}
MARIADB_PASSWORD
=
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