packaging: add configure option to preprocess and install systemd files
[samba.git] / packaging / systemd / smb.service.in
similarity index 62%
rename from packaging/systemd/smb.service
rename to packaging/systemd/smb.service.in
index adf6684c7d907524685ef6711b045b92a63b9efa..f829bcbaee5b234efb4d8a6de39d5ff4ded35438 100644 (file)
@@ -5,12 +5,13 @@ After=syslog.target network.target nmb.service winbind.service
 [Service]
 Type=notify
 NotifyAccess=all
-PIDFile=/run/smbd.pid
+PIDFile=@PIDDIR@/smbd.pid
 LimitNOFILE=16384
-EnvironmentFile=-/etc/sysconfig/samba
-ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS
 ExecReload=/usr/bin/kill -HUP $MAINPID
 LimitCORE=infinity
+@systemd_smb_extra@
 
 [Install]
 WantedBy=multi-user.target