summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-12-13 18:41:51 +0100
committerlassulus <lass@aidsballs.de>2015-12-13 18:41:51 +0100
commite90e346a8647952db70e904ee694775ce3be7abf (patch)
tree6d0be950c4f2b1a7828c9b2186ea61fdf7118f95 /krebs
parent6ab41de256066d9870a8f2e260781a9a10365a94 (diff)
parent4578f701ba01bfdf0745a8c73461070f0f7d2f0e (diff)
Merge remote-tracking branch 'pnp/master'
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/fetchWallpaper.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix
index b5eb00e9c..83ecf4177 100644
--- a/krebs/3modules/fetchWallpaper.nix
+++ b/krebs/3modules/fetchWallpaper.nix
@@ -37,11 +37,10 @@ let
fetchWallpaperScript = pkgs.writeScript "fetchWallpaper" ''
#! ${pkgs.bash}/bin/bash
- ${if (cfg.predicate == null) then "" else ''
- ${cfg.predicate}
- if [ $? -ne 0 ]; then
- echo "predicate failed"
- exit 23
+ ${optionalString (cfg.predicate != null) ''
+ if ! ${cfg.predicate}; then
+ echo "predicate failed - will not fetch from remote"
+ exit 0
fi
''}
mkdir -p ${shell.escape cfg.stateDir}