summaryrefslogtreecommitdiff
path: root/extra/samba
diff options
context:
space:
mode:
Diffstat (limited to 'extra/samba')
-rw-r--r--extra/samba/PKGBUILD17
-rw-r--r--extra/samba/samba.conf.d25
-rw-r--r--extra/samba/samba.service14
3 files changed, 44 insertions, 12 deletions
diff --git a/extra/samba/PKGBUILD b/extra/samba/PKGBUILD
index c1089a201..d0bb45a6e 100644
--- a/extra/samba/PKGBUILD
+++ b/extra/samba/PKGBUILD
@@ -15,7 +15,7 @@ pkgver=4.0.5
# to append 'a','b',etc to their subsequent releases, which pamcan
# misconstrues as alpha, beta, etc. Bad samba!
_realver=4.0.5
-pkgrel=1
+pkgrel=2
arch=(i686 x86_64)
url="http://www.samba.org"
license=('GPL3')
@@ -26,6 +26,8 @@ source=(http://us1.samba.org/samba/ftp/stable/${pkgbase}-${_realver}.tar.gz
samba.logrotate
swat.xinetd
samba.pam
+ samba.service
+ samba.conf.d
smbd.service
smbd.socket
nmbd.service
@@ -208,10 +210,12 @@ sys.path.insert(0, '/usr/lib/python${_pyver}/site-packages')" \
# install systemd files
install -d -m755 ${pkgdir}/usr/lib/systemd/system
- for i in smbd nmbd swat winbindd; do
- install -m644 ${srcdir}/*.service ${pkgdir}/usr/lib/systemd/system/
- install -m644 ${srcdir}/*.socket ${pkgdir}/usr/lib/systemd/system/
- done
+ #for i in smbd nmbd swat winbindd; do
+ install -m644 ${srcdir}/*.service ${pkgdir}/usr/lib/systemd/system/
+ install -m644 ${srcdir}/*.socket ${pkgdir}/usr/lib/systemd/system/
+ install -d -m755 ${pkgdir}/etc/conf.d
+ install -m644 ${srcdir}/samba.conf.d ${pkgdir}/etc/conf.d/samba
+ #done
# create ephemeral dirs via tmpfiles rather than shipping them in package
install -D -m644 ${srcdir}/samba.conf ${pkgdir}/usr/lib/tmpfiles.d/samba.conf
# install sample smb.conf
@@ -240,10 +244,13 @@ sys.path.insert(0, '/usr/lib/python${_pyver}/site-packages')" \
# copy ldap example
install -D -m644 ${srcdir}/samba-${_realver}/examples/LDAP/samba.schema ${pkgdir}/usr/share/doc/samba/examples/LDAP/samba.schema
}
+
md5sums=('58ec2fec08872b72f8fd526f2da20a9e'
'5697da77590ec092cc8a883bae06093c'
'a4bbfa39fee95bba2e7ad6b535fae7e6'
'96f82c38f3f540b53f3e5144900acf17'
+ '5602ba59bc60502c99e6d5a5ae16aecf'
+ '6c447748a064d631435dbef0a3dcf32f'
'd0b18dd7f5fafc8d25cb3a7c37c6d920'
'a78b9aa93eb14b0ac445897395693225'
'90845b89f2321cb19c0b13f385f1782a'
diff --git a/extra/samba/samba.conf.d b/extra/samba/samba.conf.d
index 8721f956a..760742648 100644
--- a/extra/samba/samba.conf.d
+++ b/extra/samba/samba.conf.d
@@ -1,7 +1,18 @@
-#
-# Configuration for the samba init script
-#
-
-# space separated list of daemons to launch
-SAMBA_DAEMONS=(smbd nmbd)
-#SAMBA_DAEMONS=(smbd nmbd winbindd)
+## Path: Network/Samba
+## Description: Samba process options
+## Type: string
+## Default: ""
+## ServiceRestart: samba
+SAMBAOPTIONS=""
+## Type: string
+## Default: ""
+## ServiceRestart: smb
+SMBDOPTIONS=""
+## Type: string
+## Default: ""
+## ServiceRestart: nmb
+NMBDOPTIONS=""
+## Type: string
+## Default: ""
+## ServiceRestart: winbind
+WINBINDOPTIONS=""
diff --git a/extra/samba/samba.service b/extra/samba/samba.service
new file mode 100644
index 000000000..e423a7d2d
--- /dev/null
+++ b/extra/samba/samba.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Samba AD Daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba.pid
+LimitNOFILE=16384
+EnvironmentFile=-/etc/conf.d/samba
+ExecStart=/usr/sbin/samba $SAMBAOPTIONS
+ExecReload=/usr/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target