| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | #!/usr/bin/env watchman | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | service_type='oneshot' | 
					
						
							| 
									
										
										
										
											2014-02-25 04:45:13 +04:00
										 |  |  | service_command='ip' | 
					
						
							|  |  |  | service_args='link set lo up' | 
					
						
							| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | start() { | 
					
						
							|  |  |  | 	watchman.msg "Activating the loopback interface (lo)..." | 
					
						
							| 
									
										
										
										
											2014-02-25 04:45:13 +04:00
										 |  |  | 	watchman.start | 
					
						
							| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | stop() { | 
					
						
							|  |  |  | 	watchman.status || { | 
					
						
							|  |  |  | 		watchman.err "$service_name is already disabled" | 
					
						
							|  |  |  | 		return 1 | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	watchman.msg "Deactivating the loopback interface (lo)..." | 
					
						
							|  |  |  | 	ip link set lo down | 
					
						
							|  |  |  | 	watchman.stop | 
					
						
							|  |  |  | } |