Fix samba config problem
ogrepository/pipeline/tag This commit looks good Details

pull/37/head
Nicolas Arenas 2025-03-26 19:53:43 +01:00
parent 90fd5b274f
commit 48d10b7cd9
1 changed files with 5 additions and 6 deletions

View File

@ -56,13 +56,12 @@ done
if [ -f /etc/samba/smb.conf ]; then if [ -f /etc/samba/smb.conf ]; then
dpkg-divert --package ogrepository --add --rename --divert /etc/samba/smb.conf.orig /etc/samba/smb.conf 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 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 # Configure Repo