packages/net/lighttpd/files/lighttpd.init
W. Michael Petullo a0885f117e lighttpd: create user http and run as http by default
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2014-09-21 17:33:47 -04:00

20 lines
357 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
SERVICE_USE_PID=1
START=50
start() {
user_exists http || user_add http
[ -d /var/log/lighttpd ] || {
mkdir -m 0775 -p /var/log/lighttpd
chgrp www-data /var/log/lighttpd
}
service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
}
stop() {
service_stop /usr/sbin/lighttpd
}