Fix problem with multiple includes in samba.conf
parent
703c28e4ce
commit
65a38b38f2
|
@ -145,8 +145,6 @@ configure_nginx_and_fpm() {
|
|||
|
||||
configure_samba(){
|
||||
echo "Configurando Samba"
|
||||
dpkg-divert --package ogboot --add --rename --divert /etc/samba/smb.conf.orig /etc/samba/smb.conf
|
||||
cp /etc/samba/smb.conf.orig /etc/samba/smb.conf
|
||||
mkdir -p /etc/samba/opengsys/
|
||||
cp /opt/opengnsys/ogboot/etc/samba/smb-ogboot.conf /etc/samba/opengsys/
|
||||
sed -i "s|__OGBOOT_DIR__|$OGBOOT_DIR|g" /etc/samba/opengsys/smb-ogboot.conf
|
||||
|
|
|
@ -15,4 +15,10 @@ if [ "$1" = "remove" ]; then
|
|||
|
||||
# Eliminar la desviación
|
||||
dpkg-divert --remove --rename "$CONFIG_FILE"
|
||||
# Eliminar la linea de inclusión de samba en smb.conf si existe
|
||||
INCLUDE_LINE="include = /etc/samba/opengnsys/smb_ogboot.conf"
|
||||
if grep -q "$INCLUDE_LINE" /etc/samba/smb.conf; then
|
||||
sed -i "/$INCLUDE_LINE/d" /etc/samba/smb.conf
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue