| 
									
										
										
										
											2017-07-13 16:09:42 +03:00
										 |  |  | #!/usr/bin/env ssm | 
					
						
							| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | cfg_sshd_cfgdir='/etc/ssh' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-03 11:05:52 +04:00
										 |  |  | service_respawn=true | 
					
						
							| 
									
										
										
										
											2017-12-10 20:44:17 +03:00
										 |  |  | service_command=( /usr/bin/sshd -D -f "$cfg_sshd_cfgdir/sshd_config" ) | 
					
						
							| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-13 16:09:42 +03:00
										 |  |  | depends_ready=( znet ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-04 16:47:37 +03:00
										 |  |  | pre_start() { | 
					
						
							| 
									
										
										
										
											2017-07-13 16:09:42 +03:00
										 |  |  | 	if ! [[ -e "/etc/ssh/ssh_host_key" ]]; then | 
					
						
							|  |  |  | 		ssh-keygen -A | 
					
						
							|  |  |  | 	fi | 
					
						
							| 
									
										
										
										
											2013-09-29 03:32:39 +04:00
										 |  |  | } |