Skip to content

Commit 62c05fb

Browse files
committed
Fix MySQL autostart issue on Ubuntu 14.04
1 parent 667ae61 commit 62c05fb

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

install/vst-install-ubuntu.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,9 @@ fi
601601
mpass=$(gen_pass)
602602
wget $CHOST/$VERSION/my.cnf -O /etc/mysql/my.cnf
603603
mysql_install_db
604-
update-rc.d mysql defaults
604+
if [ "$release" != '14.04' ]; then
605+
update-rc.d mysql defaults
606+
fi
605607
service mysql stop > /dev/null 2>&1
606608
service mysql start
607609
if [ "$?" -ne 0 ]; then

src/deb/vesta/postinst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ if [ -x "/usr/local/vesta/upd/fix_vesta_ssl_permissions.sh" ]; then
1515
/usr/local/vesta/upd/fix_vesta_ssl_permissions.sh
1616
fi
1717

18+
# Run MySQL autostart fixed
19+
if [ -x "/usr/local/vesta/upd/fix_mysql_startup.sh" ]; then
20+
/usr/local/vesta/upd/fix_mysql_startup.sh
21+
fi
22+
1823
exit 0

upd/fix_mysql_startup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Fix MySQL autostart for Ubuntu 14.04
4+
if [ -e "/etc/issue" ]; then
5+
release=$(head -n 1 /etc/issue | cut -f 2 -d ' ' )
6+
if [ "$release" = '14.04' ]; then
7+
update-rc.d mysql disable
8+
fi
9+
fi
10+
11+
exit

0 commit comments

Comments
 (0)