diff options
author | Tristan Helmich (omniIT) <tristan.helmich@omniit.de> | 2019-08-14 09:22:02 +0000 |
---|---|---|
committer | Tristan Helmich (omniIT) <tristan.helmich@omniit.de> | 2019-08-14 09:30:51 +0000 |
commit | 02dfc07a045c628dfa718f075e7dbdf092b523f6 (patch) | |
tree | cbe42d22debdc2bcac260ab7955f84baf5276dad | |
parent | 8746c77a383f5c76153c7a181f3616d273acfa2a (diff) | |
download | nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.tar nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.tar.gz nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.tar.bz2 nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.tar.lz nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.tar.xz nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.tar.zst nixpkgs-02dfc07a045c628dfa718f075e7dbdf092b523f6.zip |
nixos/oxidized: Use symlinks for config files
The old `cp` suffers from a permission issue on the 2nd start of the service. The files were copied from the read-only nix store. On the 2nd start of the service the `cp` failed. The new version force creates a symlink which does not suffer from this.
-rw-r--r-- | nixos/modules/services/admin/oxidized.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/admin/oxidized.nix b/nixos/modules/services/admin/oxidized.nix index 687cdfb5ba5..39112c3970d 100644 --- a/nixos/modules/services/admin/oxidized.nix +++ b/nixos/modules/services/admin/oxidized.nix @@ -97,8 +97,8 @@ in preStart = '' mkdir -p ${cfg.dataDir}/.config/oxidized - cp -v ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db - cp -v ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config + ln -f -s ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db + ln -f -s ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config ''; serviceConfig = { |