k 3 fetchWallpaper: change predicate handling
a failed predicate does not result in a failed system service it will just not download the remote
This commit is contained in:
parent
c0786aee72
commit
1c17881aed
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue