From 0424b5fc47f106db6498c4cda3476e1d49fe0f82 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 27 Oct 2011 23:14:53 +0000 Subject: Thu Oct 27 23:14:53 UTC 2011 --- community-testing/percona-server/percona.install | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 community-testing/percona-server/percona.install (limited to 'community-testing/percona-server/percona.install') diff --git a/community-testing/percona-server/percona.install b/community-testing/percona-server/percona.install new file mode 100644 index 000000000..caacccf1b --- /dev/null +++ b/community-testing/percona-server/percona.install @@ -0,0 +1,26 @@ +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 --basedir=/usr + 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 + + if [ "$(vercmp $2 5.5)" -lt 0 ]; then + echo " >> " + echo " >> Major version update. Consider restart the service, and then running mysql_upgrade after it." + echo " >> " + 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 +} -- cgit v1.2.3-54-g00ecf