mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
mysql: fix datadir check in init script
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
@@ -13,7 +13,7 @@ error() {
|
||||
}
|
||||
|
||||
start() {
|
||||
local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" /etc/my.cnf)
|
||||
local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]\"']*\([^[:space:]\"']*\)[[:space:]\"']*/\1/p" /etc/my.cnf)
|
||||
if [ ! -d "$datadir" ]; then
|
||||
error "Error: datadir '$datadir' in /etc/my.cnf doesn't exist"
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user