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 /nixos/modules/services/admin | |
parent | 8746c77a383f5c76153c7a181f3616d273acfa2a (diff) |
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.
Diffstat (limited to 'nixos/modules/services/admin')
-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 687cdfb5ba57..39112c3970d5 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 = { |