Skip to content

Commit

Permalink
Use Wants= over Requires= in systemd file (go-gitea#15897)
Browse files Browse the repository at this point in the history
`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: go-gitea#15866

Co-authored-by: zeripath <[email protected]>
  • Loading branch information
2 people authored and AbdulrhmnGhanem committed Aug 10, 2021
1 parent 110f4a3 commit ec5124a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contrib/systemd/gitea.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
###
Expand Down

0 comments on commit ec5124a

Please sign in to comment.