aboutsummaryrefslogtreecommitdiffstats
path: root/main/mini_httpd/mini_httpd.pre-install
blob: 3b5258af4b5cd99482eafd6c5deabc14b8d6a12a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# move config if needed and create compat symlink
if [ -f /etc/mini_httpd.conf ] && ! [ -L /etc/mini_httpd.conf ]; then
	mkdir -p /etc/mini_httpd
	mv /etc/mini_httpd.conf /etc/mini_httpd/mini_httpd.conf \
		&& ln -s mini_httpd/mini_httpd.conf /etc/mini_httpd.conf
fi

addgroup -S -g 82 www-data 2>/dev/null
adduser -S -H -h /var/www/localhost/htdocs -s /sbin/nologin \
        -D minihttpd 2>/dev/null
addgroup minihttpd www-data 2>/dev/null

exit 0