[Unit]
Description=Samba NMB Daemon
After=network.target samba-config.service
Requires=samba-config.service

ConditionPathExists=/storage/.cache/services/samba.conf
ConditionPathExists=/run/samba/smb.conf

[Service]
Type=forking
PIDFile=/var/run/nmbd-smb.conf.pid
ExecStart=/usr/bin/nmbd --configfile=/run/samba/smb.conf
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=1s
Restart=always
RestartSec=2
StartLimitInterval=0

[Install]
WantedBy=multi-user.target
