1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Fix args passing to execvp

This commit is contained in:
Periklis Tsirakidis 2018-06-21 21:48:06 +02:00 committed by Daiderd Jordan
parent 9f18c93771
commit 17af73ddd5
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 2 additions and 3 deletions

View file

@ -51,10 +51,9 @@ in {
environment.etc."offlineimaprc".text = cfg.extraConfig;
launchd.user.agents.offlineimap = {
path = [ cfg.package ];
command = "offlineimap";
command = "${cfg.package}/bin/offlineimap -c /etc/offlineimaprc" + optionalString (cfg.runQuick) " -q";
serviceConfig.KeepAlive = false;
serviceConfig.RunAtLoad = true;
serviceConfig.ProgramArguments = [ "-c" "/etc/offlineimaprc" ] ++ optional (cfg.runQuick) "-q";
serviceConfig.StartInterval = cfg.startInterval;
serviceConfig.StandardErrorPath = "/var/log/offlineimap.log";
serviceConfig.StandardOutPath = "/var/log/offlineimap.log";

View file

@ -34,7 +34,7 @@ in
test = ''
echo >&2 "checking offlineimap service in ~/Library/LaunchAgents"
grep "org.nixos.offlineimap" ${config.out}/user/Library/LaunchAgents/org.nixos.offlineimap.plist
grep "exec\ offlineimap" ${config.out}/user/Library/LaunchAgents/org.nixos.offlineimap.plist
grep "bin/offlineimap" ${config.out}/user/Library/LaunchAgents/org.nixos.offlineimap.plist
grep "\-q" ${config.out}/user/Library/LaunchAgents/org.nixos.offlineimap.plist
echo >&2 "checking config in /etc/offlineimaprc"