lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

lighttpd.init (450B)


      1 #!/bin/sh /etc/rc.common
      2 # Copyright (C) 2006-2011 OpenWrt.org
      3 
      4 SERVICE_USE_PID=1
      5 
      6 START=50
      7 
      8 start() {
      9 	user_exists http || user_add http
     10 	[ -d /var/log/lighttpd ] || {
     11 		mkdir -m 0775 -p /var/log/lighttpd
     12 		chgrp www-data /var/log/lighttpd
     13 	}
     14 	service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
     15 }
     16 
     17 stop() {
     18 	service_stop /usr/sbin/lighttpd
     19 }
     20 
     21 restart() {
     22 	/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf || exit 1
     23 	stop
     24 	start
     25 }
     26