summaryrefslogblamecommitdiff
path: root/sample.initd
blob: a034601d4f3d57908bc7dfb0a835e3e94ceaef89 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                      

                      


                
                      


         
                                 
                                                   


                                                                



               
                                 
                                                  

                                                      


               
#!/sbin/runscript

# Sample init.d file for alpine linux.

name=
daemon=/usr/sbin/$name

depend() {
	need net
	after firewall
}

start() {
	ebegin "Starting ${name}"
		start-stop-daemon --start --quiet \
			--pidfile /var/run/${name}.pid \
			--chuid ${sample_user}:${sample_group} \
			--exec ${daemon} -- ${sample_opts}
	eend $?
}

stop() {
	ebegin "Stopping ${name}"
		start-stop-daemon --stop --quiet \
			--pidfile /var/run/$name.pid \
			--exec ${daemon}
	eend $?
}