diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-07-02 05:18:39 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-07-12 06:33:45 +0300 |
commit | 4d1dcf7933442c4b062b85fe26a2aa6cc75a078d (patch) | |
tree | d666b9d1ed7b452a439e9c8761701acae694ffc0 /main.go | |
parent | 98303e171b4e7ce5152cadb71afaded07944f92c (diff) |
Disable chroot and add daemon-enable-jail flag
- Disable chroot mechanism by default.
- Adds the daemon-enable-jail flag which will allow users
to enable the legacy chroot mechanism if anything goes wrong.
This flag won't be available via Omnibus, instead users will
need to define the environment variable and pass to Pages.
- Simplify chroot logic from http_fs
- Update jail documentation
- Enable chroot when domain-config-source=disk
Changelog: changed
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5,6 +5,7 @@ import ( "io" "math/rand" "os" + "strings" "time" "github.com/sirupsen/logrus" @@ -79,6 +80,11 @@ func appMain() { if config.Daemon.UID != 0 || config.Daemon.GID != 0 { if err := daemonize(config); err != nil { + if strings.Contains(err.Error(), "signal:") { + log.WithField("signal", err.Error()).Info("daemon received signal") + return + } + errortracking.Capture(err) fatal(err, "could not create pages daemon") } |