Compare commits
	
		
			3 Commits
		
	
	
		
			7b5a9e9eca
			...
			323f0091f8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 323f0091f8 | |||
| d4850c945a | |||
| a8ca8410a8 | 
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -38,6 +38,6 @@ pre-test: | |||||||
| 	${SETENV} GOPATH="${WRKDIR}" | 	${SETENV} GOPATH="${WRKDIR}" | ||||||
|  |  | ||||||
| post-install: | post-install: | ||||||
| 	${INSTALL_DATA} ${WRKSRC}/mynettcptable.conf.sample ${STAGEDIR}${PREFIX}/etc | 	${INSTALL_DATA} ${WRKSRC}/mynettcptable.conf.sample ${STAGEDIR}${PREFIX}/etc/ | ||||||
|  |  | ||||||
| .include <bsd.port.mk> | .include <bsd.port.mk> | ||||||
|  | |||||||
| @ -29,12 +29,23 @@ load_rc_config $name | |||||||
| : ${mynettcptable_enable="NO"} | : ${mynettcptable_enable="NO"} | ||||||
| : ${mynettcptable_config="/usr/local/etc/mynettcptable.conf"} | : ${mynettcptable_config="/usr/local/etc/mynettcptable.conf"} | ||||||
| : ${mynettcptable_loglevel="warn"} | : ${mynettcptable_loglevel="warn"} | ||||||
| : ${mynettcptable_user:="mynettcptable"} | : ${mynettcptable_user:="nobody"} | ||||||
| : ${mynettcptable_pidfile:="/var/run/mynettcptable.pid"} |  | ||||||
| : ${mynettcptable_logfile="/var/log/mynettcptable.log"} | : ${mynettcptable_logfile="/var/log/mynettcptable.log"} | ||||||
|  |  | ||||||
| command="/usr/local/bin/mynettcptable" | pidfile="/var/run/${name}/${name}.pid" | ||||||
| command_args="-config=\${mynettcptable_config} -logLevel=\${mynettcptable_loglevel} -logLevel=\${mynettcptable_loglevel} > ${mynettcptable_logfile} 2>&1" | mynettcptable_command="/usr/local/bin/mynettcptable" | ||||||
| start_cmd="/usr/sbin/daemon -u ${mynettcptable_user} ${command} ${command_args}" |  | ||||||
|  | start_precmd="mynettcptable_prestart" | ||||||
|  | command="/usr/sbin/daemon" | ||||||
|  | command_args="-P ${pidfile} -u ${mynettcptable_user} -r -f ${mynettcptable_command} -config=${mynettcptable_config} -logLevel=${mynettcptable_loglevel} -logLevel=${mynettcptable_loglevel} >> ${mynettcptable_logfile} 2>&1" | ||||||
|  |  | ||||||
|  | mynettcptable_prestart() | ||||||
|  | { | ||||||
|  |   mkdir /var/run/${name} >/dev/null 2>&1 | ||||||
|  |   touch ${mynettcptable_logfile} | ||||||
|  |   chown ${mynettcptable_user} /var/run/${name} | ||||||
|  |   chown ${mynettcptable_user} ${mynettcptable_logfile} | ||||||
|  | } | ||||||
|  |  | ||||||
| run_rc_command "$1" | run_rc_command "$1" | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user