18 lines
		
	
	
		
			268 B
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			268 B
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env watchman
 | |
| 
 | |
| 
 | |
| service_type='oneshot'
 | |
| service_command='hostname'
 | |
| service_args="$cfg_hostname"
 | |
| 
 | |
| start() {
 | |
| 	[[ -e "/etc/hostname" ]] && {
 | |
| 		cfg_hostname=`cat /etc/hostname`
 | |
| 	} || {
 | |
| 		watchman.err "/etc/hostname: no such file"
 | |
| 		return 1
 | |
| 	}
 | |
| 
 | |
| 	watchman.start
 | |
| }
 |