mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 02:47:14 +08:00
17 lines
575 B
Plaintext
17 lines
575 B
Plaintext
post_install(){
|
|
groupadd -g 89 mysql &>/dev/null
|
|
useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
|
|
usr/bin/mysql_install_db --user=mysql
|
|
chown -R mysql:mysql var/lib/mysql &>/dev/null
|
|
}
|
|
|
|
post_upgrade(){
|
|
getent group mysql >/dev/null 2>&1 || groupadd -g 89 mysql &>/dev/null
|
|
getent passwd mysql >/dev/null 2>&1 || useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
|
|
}
|
|
|
|
post_remove(){
|
|
getent passwd mysql >/dev/null 2>&1 && userdel mysql &>/dev/null
|
|
getent group mysql >/dev/null 2>&1 && groupdel mysql &>/dev/null
|
|
}
|