summaryrefslogtreecommitdiffstats
path: root/proteanos-branding.pkg/prerm
blob: 214c71d26de04bed6155621814d9092257a33a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

if [ "x${1}" = 'xremove' ]; then
	if [ -f /usr/share/branding/www/SHA256SUMS ]; then
		if [ -f /var/www/index.html ] && \
				sha256sum -cs /usr/share/branding/www/SHA256SUMS
		then
			# /var/www/index.html exists and hasn't been modified by
			# the user.
			rm /var/www/index.html
		fi
		rm /usr/share/branding/www/SHA256SUMS
		if ls -l /var/www/branding | grep -Fq /usr/share/branding; then
			rm /var/www/branding
		fi
	fi
fi