diff options
author | root <root@rshg054.dnsready.net> | 2013-03-03 01:05:38 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-03-03 01:05:38 -0800 |
commit | 945c9cd1e94fab87653f84598812dec707843d26 (patch) | |
tree | bd1fccd08cd5fff72cdc25cb51382b882b4faa3e /community/mariadb/mariadb.install | |
parent | 98aa0004e23472ee63753fded33cd55d8b942f36 (diff) |
Sun Mar 3 01:04:55 PST 2013
Diffstat (limited to 'community/mariadb/mariadb.install')
-rw-r--r-- | community/mariadb/mariadb.install | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/community/mariadb/mariadb.install b/community/mariadb/mariadb.install deleted file mode 100644 index de619b668..000000000 --- a/community/mariadb/mariadb.install +++ /dev/null @@ -1,44 +0,0 @@ -if [[ $(command -v my_print_defaults >/dev/null 2>&1) ]]; then - datadir=$(my_print_defaults mysqld | sed -n "s/^--datadir=//p") -fi -[[ -z $datadir ]] && datadir=/var/lib/mysql - -post_install(){ - groupadd -g 89 mysql &>/dev/null - useradd -u 89 -g mysql -d $datadir -s /bin/false mysql &>/dev/null - - if [[ ! -e $datadir ]]; then - install -dm700 $datadir - usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=$datadir - chown -R mysql:mysql var/lib/mysql &>/dev/null - fi - - usr/bin/systemd-tmpfiles --create mysqld.conf -} - -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 $datadir -s /bin/false mysql &>/dev/null - - if [[ "$(vercmp $2 5.5.25-4)" -lt 0 ]] && [[ -d /data ]]; then - for x in data/*; do - cp -r $x $datadir/ - done - rm -rf data - fi - - if [[ "$(vercmp $2 5.5.25-5)" -lt 0 ]]; then - echo ">>> mysql.service has been renamed to mysqld.service to keep" - echo " consistency with MySQL package." - fi -} - -post_remove(){ - if getent passwd mysql >/dev/null 2>&1; then - userdel mysql - - fi - if getent group mysql >/dev/null 2>&1; then - groupdel mysql - fi -} |