summary refs log tree commit diff
path: root/nixos/modules/services/misc
diff options
context:
space:
mode:
authortalyz <kim.lindberger@gmail.com>2019-10-03 14:38:54 +0200
committertalyz <kim.lindberger@gmail.com>2019-10-03 14:38:54 +0200
commitc6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11 (patch)
tree7271faa8e040af753e4e098f69018199dad2c100 /nixos/modules/services/misc
parent0f8133d633cf2b4601a7a191a5a2e64a7ea92dd6 (diff)
downloadnixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.tar
nixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.tar.gz
nixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.tar.bz2
nixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.tar.lz
nixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.tar.xz
nixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.tar.zst
nixpkgs-c6efa9fd2d0bc9353ffc3dd497f677d7c49a3a11.zip
nixos/gitlab: Clean up the initializers on start
The initializers directory is populated with files from the gitlab
distribution on start, but old files will be left in the state folder
even if they're removed from the distribution, which can lead to
startup failures. Fix this by always purging the directory on start
before populating it.
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r--nixos/modules/services/misc/gitlab.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index 58ef463c49e..0b15b40c72c 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -780,6 +780,7 @@ in {
           preStart = ''
             cp -f ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
             rm -rf ${cfg.statePath}/db/*
+            rm -rf ${cfg.statePath}/config/initializers/*
             cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
             cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db