Browse Source

scripts: fix LSB init scripts so gogs starts when using mysql/postgresql for database (#4561)

Credomane Evonguard 7 years ago
parent
commit
3df25fadfa
3 changed files with 6 additions and 2 deletions
  1. 2 0
      scripts/init/centos/gogs
  2. 2 2
      scripts/init/debian/gogs
  3. 2 0
      scripts/init/suse/gogs

+ 2 - 0
scripts/init/centos/gogs

@@ -12,6 +12,8 @@
 # Provides:          gogs
 # Required-Start:    $remote_fs $syslog
 # Required-Stop:     $remote_fs $syslog
+# Should-Start:      mysql postgresql
+# Should-Stop:       mysql postgresql
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: Start gogs at boot time.

+ 2 - 2
scripts/init/debian/gogs

@@ -3,6 +3,8 @@
 # Provides:          gogs
 # Required-Start:    $syslog $network
 # Required-Stop:     $syslog
+# Should-Start:      mysql postgresql
+# Should-Stop:       mysql postgresql
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: A self-hosted Git service written in Go.
@@ -122,5 +124,3 @@ case "$1" in
 		exit 3
 		;;
 esac
-
-:

+ 2 - 0
scripts/init/suse/gogs

@@ -9,6 +9,8 @@
 # Provides:          gogs
 # Required-Start:    $remote_fs
 # Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql
+# Should-Stop:       mysql postgresql
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: Start gogs at boot time.