aboutsummaryrefslogtreecommitdiffstats
path: root/main/mini_httpd/mini_httpd.pre-install
blob: 63876f7731bf379f6dbe6e5dadc4e66df037df59 (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 -g minihttpd minihttpd 2>/dev/null
addgroup minihttpd www-data 2>/dev/null

exit 0