mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Fix MySQL config
This commit is contained in:
parent
b72ad4ac70
commit
dfecb47b06
3 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@ http:
|
|||
- ::1
|
||||
|
||||
recorder:
|
||||
db_url: mysql+pymysql://__DB_USER__:__DB_PWD__@localhost:3306/__DB_NAME__?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4
|
||||
db_url: mysql://__DB_USER__:__DB_PWD__@127.0.0.1/__DB_NAME__?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4
|
||||
|
||||
# Apply default set of integrations
|
||||
default_config:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
VERSION=2021.12.7
|
||||
|
||||
# Package dependencies
|
||||
PKG_DEPENDENCIES="python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libmariadbclient-dev libmariadb-dev-compat"
|
||||
PKG_DEPENDENCIES="python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0 libmariadbclient-dev libmariadb-dev-compat"
|
||||
|
||||
# Requirements (Major.Minor.Patch)
|
||||
# PY_VERSION=$(curl -s "https://www.python.org/ftp/python/" | grep ">3.9" | tail -n1 | cut -d '/' -f 2 | cut -d '>' -f 2)
|
||||
|
|
|
@ -86,9 +86,9 @@ if [ -z $(ynh_app_setting_get --app="$app" --key=db_name) ]; then
|
|||
db_pwd=$(ynh_app_setting_get --app="$app" --key=mysqlpwd)
|
||||
if [ -z $(sed -n "/recorder:/=" configuration.yaml) ]; then
|
||||
sed -i "$ a recorder:" "$data_path/configuration.yaml"
|
||||
sed -i "$ a \ db_url: mysql+pymysql://$db_user:$db_pwd@localhost:3306/$db_name?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4" "$data_path/configuration.yaml"
|
||||
sed -i "$ a \ db_url: mysql://$db_user:$db_pwd@127.0.0.1/$db_name?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4" "$data_path/configuration.yaml"
|
||||
else
|
||||
sed -i "/recorder:/a \ db_url: mysql+pymysql://$db_user:$db_pwd@localhost:3306/$db_name?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4" "$data_path/configuration.yaml"
|
||||
sed -i "/recorder:/a \ db_url: mysql://$db_user:$db_pwd@127.0.0.1/$db_name?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4" "$data_path/configuration.yaml"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue