| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | #!/usr/bin/env watchman | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-09-29 04:03:34 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | 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 | 
					
						
							|  |  |  | } |