aboutsummaryrefslogtreecommitdiffstats
path: root/main/mini_httpd/mini_httpd.pre-install
blob: d84f0b7718bc3f0ee2150deae9c15954274f59f6 (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 -g 82 -S 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