mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 08:21:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			631 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			631 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/sbin/openrc-run
 | |
| 
 | |
| name=pict-rs
 | |
| description="pict-rs image hosting service"
 | |
| 
 | |
| : ${cfgfile:="/etc/pict-rs/pict-rs.toml"}
 | |
| 
 | |
| command="/usr/bin/pict-rs"
 | |
| command_args="-c $cfgfile run"
 | |
| command_background=true
 | |
| command_user="pict-rs:pict-rs"
 | |
| pidfile="/run/${RC_SVCNAME}.pid"
 | |
| directory="/var/lib/pict-rs"
 | |
| output_log="/var/log/pict-rs.log"
 | |
| error_log="/var/log/pict-rs.err"
 | |
| 
 | |
| required_files="$cfgfile"
 | |
| 
 | |
| depend() {
 | |
| 	need localmount net
 | |
| 	after firewall
 | |
| }
 | |
| 
 | |
| start_pre() {
 | |
| 	checkpath -f -m 0640 -o "root:pict-rs" "$cfgfile"
 | |
| 	checkpath -f -m 0640 -o "$command_user" "$output_log" "$error_log"
 | |
| 	checkpath -d -m 0750 -o "$command_user" "$directory"
 | |
| }
 |