summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorTeo Klestrup Röijezon <teo@nullable.se>2018-06-05 21:22:41 +0200
committerRobin Gloster <mail@glob.in>2018-07-30 19:41:12 +0200
commit3250b89987c4920c0c48381023ce5465b484aaed (patch)
treec5b3f4e50aec1f0190a555f24820933d39c35301 /nixos
parenta52b6b19324f5c3603f99765cd03498f22b1da04 (diff)
downloadnixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.tar
nixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.tar.gz
nixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.tar.bz2
nixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.tar.lz
nixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.tar.xz
nixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.tar.zst
nixpkgs-3250b89987c4920c0c48381023ce5465b484aaed.zip
nixos/gitlab: don't delete ${statePath}/lib if it doesn't exist
The old behaviour caused new instances to be unable to start
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/gitlab.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index b09f0408e10..38b17239f70 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -584,7 +584,9 @@ in {
           ln -sf ${smtpSettings} ${cfg.statePath}/config/initializers/smtp_settings.rb
         ''}
         ln -sf ${cfg.statePath}/config /run/gitlab/config
-        rm ${cfg.statePath}/lib
+        if [ -e ${cfg.statePath}/lib ]; then
+          rm ${cfg.statePath}/lib
+        fi
         ln -sf ${pkgs.gitlab}/share/gitlab/lib ${cfg.statePath}/lib
         cp ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION