Skip to content

Commit 4c3e56d

Browse files
silverwindzeripath
andauthored
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: #15866 Co-authored-by: zeripath <art27@cantab.net>
1 parent a137ee7 commit 4c3e56d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/systemd/gitea.service

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ Description=Gitea (Git with a cup of tea)
33
After=syslog.target
44
After=network.target
55
###
6-
# Don't forget to add the database service requirements
6+
# Don't forget to add the database service dependencies
77
###
88
#
9-
#Requires=mysql.service
9+
#Wants=mysql.service
1010
#After=mysql.service
1111
#
12-
#Requires=mariadb.service
12+
#Wants=mariadb.service
1313
#After=mariadb.service
1414
#
15-
#Requires=postgresql.service
15+
#Wants=postgresql.service
1616
#After=postgresql.service
1717
#
18-
#Requires=memcached.service
18+
#Wants=memcached.service
1919
#After=memcached.service
2020
#
21-
#Requires=redis.service
21+
#Wants=redis.service
2222
#After=redis.service
2323
#
2424
###

0 commit comments

Comments
 (0)