From 48d10b7cd909eb5c472881cf3b8e4193646ce152 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 26 Mar 2025 19:53:43 +0100 Subject: [PATCH] Fix samba config problem --- debian/ogrepository.postinst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/debian/ogrepository.postinst b/debian/ogrepository.postinst index acccaf7..b2edec2 100755 --- a/debian/ogrepository.postinst +++ b/debian/ogrepository.postinst @@ -56,13 +56,12 @@ done if [ -f /etc/samba/smb.conf ]; then dpkg-divert --package ogrepository --add --rename --divert /etc/samba/smb.conf.orig /etc/samba/smb.conf + cp /etc/samba/smb.conf.orig /etc/samba/smb.conf + if ! grep -q "include = /etc/samba/ogrepo-smb.conf" /etc/samba/smb.conf; then + echo "include = /etc/samba/ogrepo-smb.conf" >> /etc/samba/smb.conf + fi + (echo "$SAMBA_PASS"; echo "$SAMBA_PASS") | smbpasswd -a $SAMBA_USER fi - # Incluir el archivo de configuración de samba si no está incluido ya - if ! grep -q "include = /etc/samba/ogrepo-smb.conf" /etc/samba/smb.conf; then - echo "include = /etc/samba/ogrepo-smb.conf" >> /etc/samba/smb.conf - fi - - (echo "$SAMBA_PASS"; echo "$SAMBA_PASS") | smbpasswd -a $SAMBA_USER # Configure Repo