added systemd deployment method
This commit is contained in:
		
							parent
							
								
									325299eabc
								
							
						
					
					
						commit
						dbb5466485
					
				
					 1 changed files with 17 additions and 0 deletions
				
			
		
							
								
								
									
										17
									
								
								systemd.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								systemd.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					pull-systemd:
 | 
				
			||||||
 | 
						# nop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start-systemd:
 | 
				
			||||||
 | 
						@- echo "\n### start"
 | 
				
			||||||
 | 
						@- $(foreach host,$(DEPLOY_HOSTS), \
 | 
				
			||||||
 | 
							echo "$(host)"; \
 | 
				
			||||||
 | 
							ssh $(SSH_USER)@$(host) "cp systemd.service /etc/systemd/system/$(DEPLOY_NAME).service; systemctl daemon-reload; systemctl enable $(DEPLOY_NAME).service; systemctl start $(DEPLOY_NAME).service; wait 5; systemctl status $(DEPLOY_NAME).service"; \
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					stop-systemd:
 | 
				
			||||||
 | 
						$- echo "\n### stop"
 | 
				
			||||||
 | 
						@- $(foreach host,$(DEPLOY_HOSTS), \
 | 
				
			||||||
 | 
							echo "$(host)"; \
 | 
				
			||||||
 | 
							ssh $(SSH_USER)@$(host) "systemctl stop $(DEPLOY_NAME).service; systemctl disable $(DEPLOY_NAME).service"; \
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue