summarylogtreecommitdiffstats
path: root/mysql51.install
diff options
context:
space:
mode:
authorChristian Hesse2015-06-28 22:15:42 +0200
committerChristian Hesse2015-06-28 22:15:42 +0200
commitb2000cc4bc7cdd2eeb9f90a4dff0826dbfaa7b6b (patch)
treedda01533f54694d85dc1b68df550ca4fdd556a2b /mysql51.install
downloadaur-b2000cc4bc7cdd2eeb9f90a4dff0826dbfaa7b6b.tar.gz
initial import of mysql51 5.1.73-4
Diffstat (limited to 'mysql51.install')
-rw-r--r--mysql51.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql51.install b/mysql51.install
new file mode 100644
index 00000000000..2c1fe26ffd6
--- /dev/null
+++ b/mysql51.install
@@ -0,0 +1,22 @@
+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
+
+ 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 /var/lib/mysql -s /bin/false mysql &>/dev/null
+}
+
+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
+}