diff options
author | Luke Adams <luke.adams@belljar.io> | 2017-12-28 14:31:44 -0600 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2018-01-26 22:37:17 +0100 |
commit | 1537ce9dc7673a66971e6f8f6ff20a215f75a618 (patch) | |
tree | c2bd55df4412bda9ebf2064e36a1fbc542345e53 /nixos/modules/services/network-filesystems | |
parent | 09fa345f20c3675025fad6c5d9617a368fee88ee (diff) | |
download | nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.tar nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.tar.gz nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.tar.bz2 nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.tar.lz nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.tar.xz nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.tar.zst nixlib-1537ce9dc7673a66971e6f8f6ff20a215f75a618.zip |
samba4/sambaMaster: Modify services to align with Samba project usage
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r-- | nixos/modules/services/network-filesystems/samba.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index 09cd9cb22ca8..b23266e8d43a 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -54,10 +54,12 @@ let }; serviceConfig = { - ExecStart = "${samba}/sbin/${appName} ${args}"; + ExecStart = "${samba}/sbin/${appName} --foreground --no-process-group ${args}"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; LimitNOFILE = 16384; + PIDFile = "/run/${appName}.pid"; Type = "notify"; + NotifyAccess = "all"; #may not do anything... }; restartTriggers = [ configFile ]; @@ -231,11 +233,12 @@ in after = [ "samba-setup.service" "network.target" ]; wantedBy = [ "multi-user.target" ]; }; - + # Refer to https://github.com/samba-team/samba/tree/master/packaging/systemd + # for correct use with systemd services = { - "samba-smbd" = daemonService "smbd" "-F"; - "samba-nmbd" = mkIf cfg.enableNmbd (daemonService "nmbd" "-F"); - "samba-winbindd" = mkIf cfg.enableWinbindd (daemonService "winbindd" "-F"); + "samba-smbd" = daemonService "smbd" ""; + "samba-nmbd" = mkIf cfg.enableNmbd (daemonService "nmbd" ""); + "samba-winbindd" = mkIf cfg.enableWinbindd (daemonService "winbindd" ""); "samba-setup" = { description = "Samba Setup Task"; script = setupScript; |