File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
internal/web/actions/default/setup/mysql/mysqlinstallers Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515 "net"
1616 "net/http"
1717 "os"
18+ "os/exec"
1819 "path/filepath"
1920 "regexp"
2021 "runtime"
@@ -569,6 +570,12 @@ func (this *MySQLInstaller) installService(baseDir string) error {
569570
570571 this .log ("registering systemd service ..." )
571572
573+ var startCmd = "${BASE_DIR}/support-files/mysql.server start"
574+ bashPath , _ := exec .LookPath ("bash" )
575+ if len (bashPath ) > 0 {
576+ startCmd = bashPath + " -c \" " + startCmd + "\" "
577+ }
578+
572579 var desc = `### BEGIN INIT INFO
573580# Provides: mysql
574581# Required-Start: $local_fs $network $remote_fs
@@ -589,7 +596,8 @@ After=network-online.target
589596Type=simple
590597Restart=on-failure
591598RestartSec=5s
592- ExecStart=${BASE_DIR}/support-files/mysql.server start
599+ RemainAfterExit=yes
600+ ExecStart=` + startCmd + `
593601ExecStop=${BASE_DIR}/support-files/mysql.server stop
594602ExecRestart=${BASE_DIR}/support-files/mysql.server restart
595603ExecStatus=${BASE_DIR}/support-files/mysql.server status
You can’t perform that action at this time.
0 commit comments