mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use Wants= over Requires= in systemd file (#15897)
`Requires=` has the behaviour of stopping `gitea.service` when the database is stopped but not bringing it up again after the database is started again. Use `Wants=` to define a weak requirement instead, meaning `gitea.service` will be kept running when the database is stopped, which is not an issue because gitea will just reconnect later on. Fixes: https://github.com/go-gitea/gitea/issues/15866 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -3,22 +3,22 @@ Description=Gitea (Git with a cup of tea)
 | 
			
		||||
After=syslog.target
 | 
			
		||||
After=network.target
 | 
			
		||||
###
 | 
			
		||||
# Don't forget to add the database service requirements
 | 
			
		||||
# Don't forget to add the database service dependencies
 | 
			
		||||
###
 | 
			
		||||
#
 | 
			
		||||
#Requires=mysql.service
 | 
			
		||||
#Wants=mysql.service
 | 
			
		||||
#After=mysql.service
 | 
			
		||||
#
 | 
			
		||||
#Requires=mariadb.service
 | 
			
		||||
#Wants=mariadb.service
 | 
			
		||||
#After=mariadb.service
 | 
			
		||||
#
 | 
			
		||||
#Requires=postgresql.service
 | 
			
		||||
#Wants=postgresql.service
 | 
			
		||||
#After=postgresql.service
 | 
			
		||||
#
 | 
			
		||||
#Requires=memcached.service
 | 
			
		||||
#Wants=memcached.service
 | 
			
		||||
#After=memcached.service
 | 
			
		||||
#
 | 
			
		||||
#Requires=redis.service
 | 
			
		||||
#Wants=redis.service
 | 
			
		||||
#After=redis.service
 | 
			
		||||
#
 | 
			
		||||
###
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user