mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 00:12:05 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			585 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			585 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #!/sbin/runscript
 | |
| 
 | |
| depend() {
 | |
|         need net
 | |
| }
 | |
| 
 | |
| start() {
 | |
|         ebegin "Starting tvheadend"
 | |
| 	
 | |
| 	checkconf || return 1
 | |
| 
 | |
|         start-stop-daemon --start \
 | |
|                 --exec ${TVHBIN} -- \
 | |
|                 -C -f -u ${TVHUSER} \
 | |
|                 -c ${TVHCONF}
 | |
|         eend $?
 | |
| }
 | |
| 
 | |
| stop() {
 | |
|         ebegin "Stopping tvheadend"
 | |
|         start-stop-daemon --stop --quiet \
 | |
|                 --retry TERM/30/KILL/5 \
 | |
|                 --pidfile /var/run/tvheadend.pid
 | |
|         eend $?
 | |
| }
 | |
| 
 | |
| checkconf() {
 | |
| 	if [ ! -d "$TVHCONF" ]; then
 | |
| 		eerror "config directory does not exist!"
 | |
| 		return 1
 | |
| 	fi
 | |
| }
 |