summarylogtreecommitdiffstats
path: root/xampp.install
blob: d58258302b82b67b0f9d502124bb2fd56523af71 (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
post_install() {

	if ! id -u mysql &> /dev/null; then

		echo "Creating user 'mysql'..."
		groupadd mysql -g 992
		useradd -u 992 -r -g mysql -s /bin/false 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}

}