mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
We don't need no mysql password
This commit is contained in:
parent
4ae15efd2d
commit
9c092c21b6
1 changed files with 3 additions and 5 deletions
|
@ -37,9 +37,8 @@ set_witness_files () {
|
||||||
create_witness_file "/etc/systemd/system/witnessfile.service" file
|
create_witness_file "/etc/systemd/system/witnessfile.service" file
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
local mysqlpwd=$(RUN_INSIDE_LXC cat /etc/yunohost/mysql)
|
RUN_INSIDE_LXC mysqladmin --wait status > /dev/null 2>&1
|
||||||
RUN_INSIDE_LXC mysqladmin --user=root --password="$mysqlpwd" --wait status > /dev/null 2>&1
|
echo "CREATE DATABASE witnessdb" | RUN_INSIDE_LXC mysql --wait > /dev/null 2>&1
|
||||||
echo "CREATE DATABASE witnessdb" | RUN_INSIDE_LXC mysql --user=root --password="$mysqlpwd" --wait > /dev/null 2>&1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_witness_files () {
|
check_witness_files () {
|
||||||
|
@ -82,8 +81,7 @@ check_witness_files () {
|
||||||
check_file_exist "/etc/systemd/system/witnessfile.service"
|
check_file_exist "/etc/systemd/system/witnessfile.service"
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
local mysqlpwd=$(RUN_INSIDE_LXC cat /etc/yunohost/mysql)
|
if ! RUN_INSIDE_LXC mysqlshow witnessdb > /dev/null 2>&1
|
||||||
if ! RUN_INSIDE_LXC mysqlshow --user=root --password="$mysqlpwd" witnessdb > /dev/null 2>&1
|
|
||||||
then
|
then
|
||||||
log_error "The database witnessdb is missing ! Something gone wrong !"
|
log_error "The database witnessdb is missing ! Something gone wrong !"
|
||||||
SET_RESULT "failure" witness
|
SET_RESULT "failure" witness
|
||||||
|
|
Loading…
Add table
Reference in a new issue