summarylogtreecommitdiffstats
path: root/selfoss.install
blob: 000515d22a46d9098635cc17b71e0e444c4dce65 (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
post_install() {
	echo ""
	echo "==> Installed in : /usr/share/webapps/selfoss"
	echo "==> If using Apache, change RewriteBase in .htaccess"
	echo ""
	echo "==> Config is at /etc/webapps/selfoss/config.ini"
	echo ""
}


pre_upgrade() {
	# save old untracked config (from pkgbuild 2.8) and make it tracked
	if [[ -f /usr/share/webapps/selfoss/config.ini && ! -h /usr/share/webapps/selfoss/config.ini ]]; then
		install -Dm644 /usr/share/webapps/selfoss/config.ini -t /etc/webapps/selfoss/
	fi
}

post_upgrade() {
	rm -f /usr/share/webapps/selfoss/public/{all*.css,all*.js}

	echo ""
	echo "==> For a clean update:"
	echo "==> Change RewriteBase in .htaccess (in case of Apache)"
	echo "==> Refresh your browser cache (CTRL+R in most cases)"
	echo ""
}

pre_remove() {
	# remove untracked files
	find /usr/share/webapps/selfoss/data/ -type f -exec rm -f '{}' ';' 2> /dev/null
	rm -f /usr/share/webapps/selfoss/public/{all*.css,all*.js}
}