blob: 1d8e9329bbdcbf45e6573e165e686960566e03de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Make sure to synchronize the UUID declared here with the one declared in the PKGBUILD
_mysql_uuid=992
post_install() {
if ! id -u mysql &> /dev/null; then
echo "Creating user 'mysql'..."
groupadd mysql -g "${_mysql_uuid}"
useradd -u "${_mysql_uuid}" -r -g mysql -s /bin/false mysql
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
fi
echo "XAMPP is now installed below the /opt/lampp directory"
echo "To start, stop or restart XAMPP simply call the command:"
echo " lampp {start, stop, restart} or xampp {start, stop, restart}"
echo "Then you can check that everything really works, Just enter the following URL at your web browser:"
echo " http://localhost"
}
pre_upgrade() {
/opt/lampp/lampp stop >/dev/null 2>&1
cp -r /opt/lampp/ /opt/lampp_backup
echo "Your /opt/lampp/ folder were backed up to /opt/lampp/htdocs_backup"
}
post_upgrade() {
echo "REMEMBER: Your /opt/lampp folder were backed up to /opt/lampp_backup"
echo "Restore manually the needed configuration files."
}
pre_remove() {
echo "Stopping lampp services..."
/opt/lampp/lampp stop >/dev/null 2>&1
cp -r /opt/lampp/htdocs /opt/lampp/htdocs_backup
echo "Your htdocs folder were backed up to /opt/lampp/htdocs_backup"
}
post_remove() {
rm -rf /opt/lampp/{etc,var}
}
|