Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compose.libre.sh
Manage
Activity
Members
Labels
Plan
Issues
18
Issue boards
Milestones
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
libre.sh
compose.libre.sh
Commits
b3b78c6b
Commit
b3b78c6b
authored
10 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
Fixes 41, mysql re-import + some timing issues
parent
8552a3de
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
unit-files/backup@.timer
+1
-1
1 addition, 1 deletion
unit-files/backup@.timer
unit-files/mysql-importer@.service
+10
-10
10 additions, 10 deletions
unit-files/mysql-importer@.service
unit-files/wordpress-importer@.service
+1
-1
1 addition, 1 deletion
unit-files/wordpress-importer@.service
with
12 additions
and
12 deletions
unit-files/backup@.timer
+
1
−
1
View file @
b3b78c6b
...
...
@@ -2,7 +2,7 @@
Description=Hourly backup of www and mysql content to a git repo
[Timer]
OnActiveSec=0
OnActiveSec=
1
0
OnUnitActiveSec=10min
[Install]
...
...
This diff is collapsed.
Click to expand it.
unit-files/mysql-importer@.service
+
10
−
10
View file @
b3b78c6b
...
...
@@ -12,16 +12,16 @@ Type=oneshot
RemainAfterExit
=
yes
ExecStart
=
/bin/bash -euxc '
\
mysql_folder=/data/domains/%i/mysql;
\
if [ ! -d
$mysql_folder
]; then
\
mkdir
-
p
$mysql_folder
;
\
pass=`echo $RANDOM ${date} | md5sum | base64 | cut -c-10`
;
\
echo MYSQL_PASS=$pass > $mysql_folder/.env
;
\
fi;
\
if [
-
f
$mysql_folder
/dump.sql ]; then
\
echo develop import mysql feature
;
\
exit 1
;
\
else
\
mkdir -p /data/runtime/domains/%i/mysql/db_files
;
\
if [ ! -d
/data/runtime/domains/%i/mysql
]; then
\
if [
-
d
$mysql_folder
]; then
\
echo develop import mysql feature
;
\
exit 1
;
\
else
\
mkdir
-
p
$mysql_folder
;
\
pass=`echo $RANDOM ${date} | md5sum | base64 | cut -c-10`
;
\
echo MYSQL_PASS=$pass > $mysql_folder/.env
;
\
mkdir -p /data/runtime/domains/%i/mysql;
\
fi
;
\
fi'
[Install]
...
...
This diff is collapsed.
Click to expand it.
unit-files/wordpress-importer@.service
+
1
−
1
View file @
b3b78c6b
...
...
@@ -2,7 +2,7 @@
Description
=
WordPress importer
# Dependency ordering
After
=
mysql
-importer
@%i.service
After
=
mysql@%i.service
Before
=
wordpress@%i.service
Before
=
backup@%i.timer
...
...
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