diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-05-13 16:25:07 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-05-13 16:27:54 +0200 |
| commit | 16cbb8f6a113f42cfca09dae92bbc1f3c58dc656 (patch) | |
| tree | 1b646a545acde229a4ca5f476905f8a57cea5c6f /modules/system/launchd.nix | |
| parent | 0495b41b4d852b60fafc6dd3ee08a85cdfa3a926 (diff) | |
launchd: fix reload of services
Diffstat (limited to 'modules/system/launchd.nix')
| -rw-r--r-- | modules/system/launchd.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/system/launchd.nix b/modules/system/launchd.nix index e0d2a62..7a70e1a 100644 --- a/modules/system/launchd.nix +++ b/modules/system/launchd.nix @@ -12,22 +12,22 @@ let }; launchdActivation = basedir: target: '' - if ! diff '${cfg.build.launchd}/Library/${basedir}/${target}' '/Library/${basedir}/${target}'; then + if ! diff '${cfg.build.launchd}/Library/${basedir}/${target}' '/Library/${basedir}/${target}' &> /dev/null; then if test -f '/Library/${basedir}/${target}'; then launchctl unload -w '/Library/${basedir}/${target}' || true fi cp -f '${cfg.build.launchd}/Library/${basedir}/${target}' '/Library/${basedir}/${target}' - launchctl load '/Library/${basedir}/${target}' + launchctl load -w '/Library/${basedir}/${target}' fi ''; userLaunchdActivation = target: '' - if ! diff ${cfg.build.launchd}/user/Library/LaunchAgents/${target} ~/Library/LaunchAgents/${target}; then + if ! diff ${cfg.build.launchd}/user/Library/LaunchAgents/${target} ~/Library/LaunchAgents/${target} &> /dev/null; then if test -f ~/Library/LaunchAgents/${target}; then launchctl unload -w ~/Library/LaunchAgents/${target} || true fi cp -f '${cfg.build.launchd}/user/Library/LaunchAgents/${target}' ~/Library/LaunchAgents/${target} - launchctl load ~/Library/LaunchAgents/${target} + launchctl load -w ~/Library/LaunchAgents/${target} fi ''; |
