File: //var/packages/SMBService/conf/systemd/pkg-synosamba-nmbd.service
[Unit]
Description=NetBIOS name server
Requisite=network-online.target
After=network-online.target
IgnoreOnIsolate=no
DefaultDependencies=yes
[Service]
Type=notify
PIDFile=/run/samba/nmbd.pid
Slice=SMBService.slice
Restart=on-failure
ExecStartPre=-/var/packages/SMBService/conf/systemd/nmbd.sh prestart
ExecStart=/var/packages/SMBService/target/usr/sbin/nmbd -F --no-process-group
ExecReload=/bin/kill -HUP $MAINPID
;; DSM's systemd is too old to support these useful options...😢
;; ref:
;; - latest version: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
;; - systemd 215: https://manpages.debian.org/jessie/systemd/systemd.exec.5.en.html
;; (RuntimeDirectory is supported but RuntimeDirectoryPreserve isn't.
;; Sadly, samba runtime directory must be preserved.)
;RuntimeDirectory=samba
;RuntimeDirectoryPreserve=yes
;StateDirectory=samba
;CacheDirectory=samba
;LogsDirectory=samba
;ConfigurationDirectory=samba
; Notice that nmbd cannot be reloaded.
[Install]
WantedBy=multi-user.target
[X-Synology]