From c7262501721226b047d0d86ead40d9cadf3bc61f Mon Sep 17 00:00:00 2001 From: nachoparker Date: Fri, 14 Apr 2017 15:26:18 +0200 Subject: [PATCH] added samba/cifs --- etc/nextcloudpi-config.d/NFS.sh | 2 +- etc/nextcloudpi-config.d/samba.sh | 98 +++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 etc/nextcloudpi-config.d/samba.sh diff --git a/etc/nextcloudpi-config.d/NFS.sh b/etc/nextcloudpi-config.d/NFS.sh index 2992dfef6..fb55554fc 100755 --- a/etc/nextcloudpi-config.d/NFS.sh +++ b/etc/nextcloudpi-config.d/NFS.sh @@ -88,7 +88,7 @@ EOF systemctl enable rpcbind systemctl enable nfs-kernel-server - service nfs-kernel-server start + service nfs-kernel-server restart } cleanup() diff --git a/etc/nextcloudpi-config.d/samba.sh b/etc/nextcloudpi-config.d/samba.sh new file mode 100644 index 000000000..dab2a5cab --- /dev/null +++ b/etc/nextcloudpi-config.d/samba.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +# SAMBA/CIFS server for Raspbian +# Tested with 2017-03-02-raspbian-jessie-lite.img +# +# Copyleft 2017 by Ignacio Nunez Hernanz +# GPL licensed (see end of file) * Use at your own risk! +# +# Usage: +# +# ./installer.sh samba.sh () +# +# See installer.sh instructions for details +# More at: https://ownyourbits.com +# + +DIR_=/media/USBdrive/ncdata/admin/files +USER_=pi +PWD_=raspberry +DESCRIPTION="SAMBA/CIFS file server (for Mac/Linux/Windows)" + +# mkdir -p /var/log/samba in init.d + +install() +{ + apt-get update + apt-get install --no-install-recommends -y samba + update-rc.d smbd disable + + # the directory needs to be recreated if we are using nc-ramlogs + grep -q mkdir /etc/init.d/smbd || sed -i "/\> /etc/samba/smb.conf <