From 2cb0ff1e1f5a40daf47714bb4bec60a29b419f6a Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Fri, 18 Jun 2021 09:06:24 +0200 Subject: [PATCH] Gestion des ouvertures de ports --- dicos/50_smb.xml | 25 ++++++++++++++++++++----- posttemplate/02-smb_partages | 12 ++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100755 posttemplate/02-smb_partages diff --git a/dicos/50_smb.xml b/dicos/50_smb.xml index 762e3a2..0247219 100644 --- a/dicos/50_smb.xml +++ b/dicos/50_smb.xml @@ -1,6 +1,14 @@ + + 139 + 445 + + + smb_share_allowed_network + + @@ -11,20 +19,27 @@ - + non - - + + + + - - smb_share_path + + smb_share_name + + + smb_share_allowed_netmask non smb_share_name + smb_share_allowed_network + smb_share_allowed_netmask smb_share diff --git a/posttemplate/02-smb_partages b/posttemplate/02-smb_partages new file mode 100755 index 0000000..883ddbd --- /dev/null +++ b/posttemplate/02-smb_partages @@ -0,0 +1,12 @@ +#!/bin/bash + +# partages multiples +if [ "$(CreoleGet use_smb_share non)" = "oui" ]; then + for path in $(CreoleGet smb_share_path); do + if [ ! -d $path ]; then + /bin/mkdir -p $path + chmod g+ws $path + fi + done +fi +exit 0