source: vendor/current/source3/script/smbaddshare

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 704 bytes
Line 
1#!/bin/sh
2#
3# smbaddshare
4#
5# Copyright (C) 2015 Christof Schmitt
6#
7# Example script that can be used with the 'add share command' config
8# option. This is mainly intended for use in the Samba selftest suite,
9# please review and adapt it before using elsewhere.
10#
11
12CONF="$1"
13SHARENAME="$2"
14SHAREPATH="$3"
15COMMENT="$4"
16MAX_CONN="$5"
17
18NETCONF="$BINDIR/net --configfile=$CONF conf"
19
20$NETCONF addshare "$SHARENAME" "$SHAREPATH" writeable=no guest_ok=no "$COMMENT"
21RC=$?
22if [[ $RC -ne 0 ]]; then
23 echo Failure during addshare: rc=$RC
24 exit $RC
25fi
26
27$NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN"
28RC=$?
29if [[ $RC -ne 0 ]]; then
30 echo Failure during setparm for max connections: rc=$RC
31 exit $RC
32fi
Note: See TracBrowser for help on using the repository browser.