source: vendor/current/source3/script/smbchangeshare

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: 1002 bytes
Line 
1#!/bin/sh
2#
3# smbchangeshare
4#
5# Copyright (C) 2015 Christof Schmitt
6#
7# Example script that can be used with the 'change share command'
8# config option. This is mainly intended for use in the Samba selftest
9# suite, please review and adapt it before using elsewhere.
10#
11
12CONF="$1"
13SHARENAME="$2"
14SHAREPATH="$3"
15COMMENT="$4"
16MAX_CONN="$5"
17CSC_POLICY="$6"
18
19NETCONF="$BINDIR/net --configfile=$CONF conf"
20
21$NETCONF setparm "$SHARENAME" 'path' "$SHAREPATH"
22RC=$?
23if [[ $RC -ne 0 ]]; then
24 echo Failure during setparm for path: rc=$RC
25 exit $RC
26fi
27
28$NETCONF setparm "$SHARENAME" 'comment' "$COMMENT"
29RC=$?
30if [[ $RC -ne 0 ]]; then
31 echo Failed during setparm for comment: rc=$RC
32 exit $RC
33fi
34
35$NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN"
36RC=$?
37if [[ $RC -ne 0 ]]; then
38 echo Failure during setparm for max connections: rc=$RC
39 exit $RC
40fi
41
42$NETCONF setparm "$SHARENAME" 'csc policy' "$CSC_POLICY"
43RC=$?
44if [[ $RC -ne 0 ]]; then
45 echo Failure during setparm for csc policy: rc=$RC
46 exit $RC
47fi
Note: See TracBrowser for help on using the repository browser.