Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
docker
roundcube
Commits
a0599010
Commit
a0599010
authored
Feb 08, 2018
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use /etc/roundcube/my.cnf for mysql config, if present
parent
8f9b7f0c
Pipeline
#849
passed with stages
in 3 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
start.sh
start.sh
+9
-3
No files found.
start.sh
View file @
a0599010
...
...
@@ -13,6 +13,12 @@ TARGET_DIR=/var/www/webmail
# Name of the MySQL database to use.
MYSQL_DB
=
"ai_roundcube"
# If ${CONFIG_DIR}/my.cnf exists, use it as a defaults file for mysql.
MYSQL
=
mysql
if
[
-e
"
${
CONFIG_DIR
}
/my.cnf"
]
;
then
MYSQL
=
"
${
MYSQL
}
--defaults-file=
${
CONFIG_DIR
}
/my.cnf"
fi
die
()
{
echo
"ERROR:
$*
"
>
&2
exit
1
...
...
@@ -46,9 +52,9 @@ cur_version=$(mysql -NBe 'select version from rc_version' ${MYSQL_DB} 2>/dev/nul
# If cur_version is empty, it means that the database has not been
# initialized yet.
if
[
-z
"
${
cur_version
}
"
]
;
then
mysql
${
MYSQL_DB
}
<
${
TARGET_DIR
}
/SQL/mysql.initial.sql
\
${
MYSQL
}
${
MYSQL_DB
}
<
${
TARGET_DIR
}
/SQL/mysql.initial.sql
\
||
die
"could not load initial SQL schema to
${
MYSQL_DB
}
"
mysql
-e
"create table rc_version (version text); insert into rc_version (version) values ('unknown')"
${
MYSQL_DB
}
\
${
MYSQL
}
-e
"create table rc_version (version text); insert into rc_version (version) values ('unknown')"
${
MYSQL_DB
}
\
||
die
"could not create rc_version table in
${
MYSQL_DB
}
"
fi
...
...
@@ -56,6 +62,6 @@ fi
${
TARGET_DIR
}
/bin/update.sh
-v
${
cur_version
}
-y
\
||
die
"Roundcube update script failed"
mysql
-e
"update rc_version set version='
${
RC_VERSION
}
'"
${
MYSQL_DB
}
${
MYSQL
}
-e
"update rc_version set version='
${
RC_VERSION
}
'"
${
MYSQL_DB
}
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment