-
Notifications
You must be signed in to change notification settings - Fork 308
/
setup-smb.sh
58 lines (43 loc) · 1.28 KB
/
setup-smb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -exuo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
env EXTRA_NFS_ARGS=",ro" "${DIR}/setup-common.sh"
apt-get -y update
apt-get -y install software-properties-common
apt-get install -y \
pkg-config \
gcc-10 \
automake \
flex \
bison \
gnutls-dev \
liblmdb-dev \
libgpgme-dev \
libarchive-dev \
libacl1-dev \
libldap2-dev \
libpopt-dev \
libtasn1-bin \
libjansson-dev \
python3-markdown \
python3-dnspython
export PERL_MM_USE_DEFAULT=1
cpan App::cpanminus
cpanm Parse::Yapp
cpanm JSON
git clone --depth 1 https://github.com/compiler-explorer/samba
cd samba
# todo:
# --enable-fhs
# Use FHS-compliant paths (default no)
# You should consider using this together with:
# --prefix=/usr --sysconfdir=/etc --localstatedir=/var
./configure --enable-fhs --systemd-install-services "--bundled-libraries=cmocka,popt,NONE" "--bundled-libraries=talloc,pytalloc-util,tdb,pytdb,ldb,pyldb,pyldb-util,tevent,pytevent,popt" --without-pam --with-shared-modules='!vfs_snapper'
make
make install
cd ..
cp -f /infra/smb-server/smb.conf /usr/local/samba/etc/samba/smb.conf
mkdir -p /winshared
chown ubuntu:ubuntu /winshared
# run rsync on startup
#/infra/smb-server/rsync-share.sh