mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Microdecision: those weren't space, wtf
This commit is contained in:
parent
1c752db22b
commit
1056977dc6
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
|
||||||
# usage: ynh_mysql_connect_as user pwd [db]
|
# usage: ynh_mysql_connect_as user pwd [db]
|
||||||
# | arg: user - the user name to connect as
|
# | arg: user - the user name to connect as
|
||||||
# | arg: pwd - the user password
|
# | arg: pwd - the user password
|
||||||
# | arg: db - the database to connect to
|
# | arg: db - the database to connect to
|
||||||
ynh_mysql_connect_as() {
|
ynh_mysql_connect_as() {
|
||||||
mysql -u "$1" --password="$2" -B "${3:-}"
|
mysql -u "$1" --password="$2" -B "${3:-}"
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ ynh_mysql_connect_as() {
|
||||||
#
|
#
|
||||||
# usage: ynh_mysql_execute_as_root sql [db]
|
# usage: ynh_mysql_execute_as_root sql [db]
|
||||||
# | arg: sql - the SQL command to execute
|
# | arg: sql - the SQL command to execute
|
||||||
# | arg: db - the database to connect to
|
# | arg: db - the database to connect to
|
||||||
ynh_mysql_execute_as_root() {
|
ynh_mysql_execute_as_root() {
|
||||||
ynh_mysql_connect_as "root" "$(sudo cat $MYSQL_ROOT_PWD_FILE)" \
|
ynh_mysql_connect_as "root" "$(sudo cat $MYSQL_ROOT_PWD_FILE)" \
|
||||||
"${2:-}" <<< "$1"
|
"${2:-}" <<< "$1"
|
||||||
|
@ -27,7 +27,7 @@ ynh_mysql_execute_as_root() {
|
||||||
#
|
#
|
||||||
# usage: ynh_mysql_execute_file_as_root file [db]
|
# usage: ynh_mysql_execute_file_as_root file [db]
|
||||||
# | arg: file - the file containing SQL commands
|
# | arg: file - the file containing SQL commands
|
||||||
# | arg: db - the database to connect to
|
# | arg: db - the database to connect to
|
||||||
ynh_mysql_execute_file_as_root() {
|
ynh_mysql_execute_file_as_root() {
|
||||||
ynh_mysql_connect_as "root" "$(sudo cat $MYSQL_ROOT_PWD_FILE)" \
|
ynh_mysql_connect_as "root" "$(sudo cat $MYSQL_ROOT_PWD_FILE)" \
|
||||||
"${2:-}" < "$1"
|
"${2:-}" < "$1"
|
||||||
|
|
Loading…
Add table
Reference in a new issue