packages/net/lighttpd/files/lighttpd.init
Glenn Strauss 6e788aca0c lighttpd: add new modules, upd URLs, add restart()
(with feedback from @hnyman and patch additions from @MikePetullo)

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2017-03-22 03:03:36 -04:00

26 lines
450 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
}
restart() {
/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf || exit 1
stop
start
}