mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
samba:
- adding support for user created samba.conf - cleanups & cosmetics - adding sample samba.conf - start only system smb.conf if user samba.conf not exist
This commit is contained in:
parent
c933b57e1a
commit
9c4f052eb7
75
packages/network/samba/config/samba.conf.sample
Normal file
75
packages/network/samba/config/samba.conf.sample
Normal file
@ -0,0 +1,75 @@
|
||||
[global]
|
||||
server string = OpenELEC.tv Mediacenter(%i)
|
||||
workgroup = WORKGROUP
|
||||
netbios name = openelec
|
||||
security = share
|
||||
guest account = root
|
||||
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
|
||||
wins support = no
|
||||
syslog only = yes
|
||||
|
||||
# here you can add a writable share of a disk under /storage
|
||||
|
||||
[Update]
|
||||
path = /storage/.update
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/.update
|
||||
|
||||
[Videos]
|
||||
path = /storage/videos
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/videos
|
||||
|
||||
[Music]
|
||||
path = /storage/music
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/music
|
||||
|
||||
[TV Shows]
|
||||
path = /storage/tvshows
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/tvshows
|
||||
|
||||
[Downloads]
|
||||
path = /storage/downloads
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/downloads
|
||||
|
||||
[Pictures]
|
||||
path = /storage/pictures
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/pictures
|
||||
|
||||
[Configfiles]
|
||||
path = /storage/.config
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/.config
|
||||
|
||||
[Screenshots]
|
||||
path = /storage/screenshots
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/screenshots
|
@ -5,5 +5,16 @@
|
||||
(
|
||||
progress "Starting Samba server"
|
||||
|
||||
smbd -D > /dev/null 2>&1
|
||||
SMB_USERCONF="/storage/.config/samba.conf"
|
||||
SMB_DEFCONF="/etc/samba/smb.conf"
|
||||
SMB_ARG="--daemon"
|
||||
|
||||
if [ -f $SMB_USERCONF ]; then
|
||||
SMB_ARG="$SMB_ARG --configfile=$SMB_USERCONF"
|
||||
else
|
||||
SMB_ARG="$SMB_ARG --configfile=$SMB_DEFCONF"
|
||||
fi
|
||||
|
||||
smbd $SMB_ARG > /dev/null 2>&1
|
||||
|
||||
)&
|
||||
|
@ -8,14 +8,17 @@ $SCRIPTS/install avahi
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/source3/bin/libsmbclient.so* $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/source3/bin/libtalloc.so* $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/source3/bin/libtdb.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/source3/bin/libsmbclient.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/source3/bin/libtalloc.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/source3/bin/libtdb.so* $INSTALL/usr/lib
|
||||
|
||||
mkdir -p $INSTALL/usr/config
|
||||
cp -P $PKG_DIR/config/samba.conf.sample $INSTALL/usr/config
|
||||
|
||||
if [ "$SAMBA_SERVER" = yes ]; then
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp $PKG_BUILD/source3/bin/smbd $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/source3/bin/smbd $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/etc/samba
|
||||
cp $PKG_DIR/config/smb.conf $INSTALL/etc/samba
|
||||
cp -P $PKG_DIR/config/smb.conf $INSTALL/etc/samba
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user