samba4/sambaMaster: Modify services to align with Samba project usage
This commit is contained in:
parent
09fa345f20
commit
1537ce9dc7
@ -54,10 +54,12 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${samba}/sbin/${appName} ${args}";
|
ExecStart = "${samba}/sbin/${appName} --foreground --no-process-group ${args}";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
LimitNOFILE = 16384;
|
LimitNOFILE = 16384;
|
||||||
|
PIDFile = "/run/${appName}.pid";
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
|
NotifyAccess = "all"; #may not do anything...
|
||||||
};
|
};
|
||||||
|
|
||||||
restartTriggers = [ configFile ];
|
restartTriggers = [ configFile ];
|
||||||
@ -231,11 +233,12 @@ in
|
|||||||
after = [ "samba-setup.service" "network.target" ];
|
after = [ "samba-setup.service" "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
# Refer to https://github.com/samba-team/samba/tree/master/packaging/systemd
|
||||||
|
# for correct use with systemd
|
||||||
services = {
|
services = {
|
||||||
"samba-smbd" = daemonService "smbd" "-F";
|
"samba-smbd" = daemonService "smbd" "";
|
||||||
"samba-nmbd" = mkIf cfg.enableNmbd (daemonService "nmbd" "-F");
|
"samba-nmbd" = mkIf cfg.enableNmbd (daemonService "nmbd" "");
|
||||||
"samba-winbindd" = mkIf cfg.enableWinbindd (daemonService "winbindd" "-F");
|
"samba-winbindd" = mkIf cfg.enableWinbindd (daemonService "winbindd" "");
|
||||||
"samba-setup" = {
|
"samba-setup" = {
|
||||||
description = "Samba Setup Task";
|
description = "Samba Setup Task";
|
||||||
script = setupScript;
|
script = setupScript;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user