be3221e93d
- SPEC: add User Story 0 (Property Setup via Catastro) as P1 entry - SPEC: add catastro_data and catastro_imports tables to data model - PLAN: add Phase 2A (Catastro Integration) with 8 tasks - AGENTS.md: add 3 key decisions (Catastro SSOT, 3DGS hybrid, plan inputs) - Demo v3: Spanish apartment (C/ Altabix 24, 3ºB, Elche), 7 rooms, upload panel for catastro/DXF, proper collisions on all doors
47 lines
1.3 KiB
Bash
Executable File
47 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Setup Samba share for ~/projects (InteriorScan and other repos)
|
|
# Run with: sudo bash ~/projects/interiorscan/setup-samba.sh
|
|
|
|
set -e
|
|
|
|
echo "=== Setting up Samba share for ~/projects ==="
|
|
|
|
# 1. Add share to smb.conf
|
|
if ! grep -q "\[projects\]" /etc/samba/smb.conf; then
|
|
cat >> /etc/samba/smb.conf << 'EOF'
|
|
|
|
[projects]
|
|
comment = Development Projects
|
|
path = /home/monyi/projects
|
|
browseable = yes
|
|
read only = no
|
|
guest ok = yes
|
|
create mask = 0664
|
|
directory mask = 0775
|
|
force user = monyi
|
|
EOF
|
|
echo "✓ Share [projects] added to smb.conf"
|
|
else
|
|
echo "⚠ Share [projects] already exists in smb.conf"
|
|
fi
|
|
|
|
# 2. Set permissions on projects dir
|
|
chmod -R 775 /home/monyi/projects 2>/dev/null || true
|
|
echo "✓ Permissions set on /home/monyi/projects"
|
|
|
|
# 3. Test config
|
|
echo ""
|
|
echo "Testing Samba config..."
|
|
testparm -s 2>/dev/null | grep -A5 "\[projects\]" || echo "Run 'sudo testparm' to verify"
|
|
|
|
# 4. Restart Samba
|
|
echo ""
|
|
echo "Restarting Samba services..."
|
|
systemctl restart smbd nmbd 2>/dev/null || service smbd restart 2>/dev/null || echo "⚠ Could not restart smbd — run: sudo systemctl restart smbd nmbd"
|
|
|
|
echo ""
|
|
echo "=== Done! ==="
|
|
echo "From Windows, open: \\\\192.168.1.13\\projects"
|
|
echo "Or in File Explorer: \\\\192.168.1.13\\projects"
|
|
echo ""
|
|
echo "The demo.html is at: \\\\192.168.1.13\\projects\\interiorscan\\demo.html" |