Add samba.service unit in samba-dc package

tags/samba-4.6.2-13.fws.beta7
Daniel Berteaud 7 years ago
parent 2de503b027
commit 49fc35e69e
  1. 16
      samba.service
  2. 15
      samba.spec

@ -0,0 +1,16 @@
[Unit]
Description=Samba AD Daemon
After=syslog.target network.target
[Service]
Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba
Type=notify
NotifyAccess=all
PIDFile=/run/samba.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/sysconfig/samba
ExecStart=/usr/sbin/samba --foreground --no-process-group $SAMBAOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

@ -99,6 +99,9 @@ Source0: samba-%{version}%{pre_release}.tar.gz
Source1: samba-%{version}%{pre_release}.tar.asc Source1: samba-%{version}%{pre_release}.tar.asc
Source2: gpgkey-52FBC0B86D954B0843324CDC6F33915B6568B7EA.gpg Source2: gpgkey-52FBC0B86D954B0843324CDC6F33915B6568B7EA.gpg
# For DC
Source3: samba.service
# Red Hat specific replacement-files # Red Hat specific replacement-files
Source10: samba.log Source10: samba.log
Source11: smb.conf.vendor Source11: smb.conf.vendor
@ -866,6 +869,8 @@ install -m 0644 %{SOURCE201} packaging/README.downgrade
%if ! %with_dc %if ! %with_dc
install -m 0644 %{SOURCE200} packaging/README.dc install -m 0644 %{SOURCE200} packaging/README.dc
install -m 0644 %{SOURCE200} packaging/README.dc-libs install -m 0644 %{SOURCE200} packaging/README.dc-libs
%else
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/samba.service
%endif %endif
install -d -m 0755 %{buildroot}%{_unitdir} install -d -m 0755 %{buildroot}%{_unitdir}
@ -949,7 +954,17 @@ fi
%if %with_dc %if %with_dc
%post dc-libs -p /sbin/ldconfig %post dc-libs -p /sbin/ldconfig
%postun dc-libs -p /sbin/ldconfig %postun dc-libs -p /sbin/ldconfig
%post dc
%systemd_post samba.service
%preun dc
%systemd_preun samba.service
%postun dc
%systemd_postun_with_restart samba.service
%endif %endif
%post krb5-printing %post krb5-printing

Loading…
Cancel
Save