Merge pull request #1 from outis1one/claude/review-repo-docs-QFDqX

Claude/review repo docs qf dq x
This commit is contained in:
outis1one
2025-12-27 19:29:44 -05:00
committed by GitHub
2 changed files with 217 additions and 117 deletions
+5 -5
View File
@@ -56,12 +56,12 @@ Automated setup script for Ubuntu 24.04 Desktop that installs essential tools, c
### 1. Download the Script ### 1. Download the Script
```bash ```bash
# Download (replace URL with actual location) # Clone the repository
wget https://your-domain.com/post-install.sh git clone https://github.com/outis1one/post-ubuntu-install.git
cd post-ubuntu-install
# Or create manually # Or download the script directly
nano post-install.sh wget https://raw.githubusercontent.com/outis1one/post-ubuntu-install/main/ubuntu-post-install.sh -O post-install.sh
# Paste the script content and save (Ctrl+O, Enter, Ctrl+X)
``` ```
### 2. Make Executable ### 2. Make Executable
+106 -6
View File
@@ -243,6 +243,80 @@ echo "Verifying Docker installation..."
docker --version || echo "Warning: Docker verification failed" docker --version || echo "Warning: Docker verification failed"
docker compose version || echo "Warning: Docker Compose verification failed" docker compose version || echo "Warning: Docker Compose verification failed"
# Samba File Sharing (Optional)
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "SAMBA FILE SHARING (Optional)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Samba allows you to share folders over the network to Windows, Mac, and Linux."
echo "The script will share your primary drive at ~/drives/primary"
echo ""
read -p "Install and configure Samba file sharing? (y/n): " INSTALL_SAMBA
if [ "$INSTALL_SAMBA" = "y" ] || [ "$INSTALL_SAMBA" = "Y" ]; then
echo ""
echo "Installing Samba file sharing..."
echo " - Samba: SMB/CIFS file server for network file sharing"
echo ""
apt install -y samba || echo "Warning: Samba installation failed, continuing..."
# Configure Samba share for primary drive
if command -v smbd &> /dev/null; then
echo ""
echo "Configuring Samba share for primary drive..."
# Backup existing config
cp /etc/samba/smb.conf /etc/samba/smb.conf.backup-$(date +%Y%m%d-%H%M%S)
# Add Primary share configuration
if ! grep -q "\[Primary\]" /etc/samba/smb.conf; then
cat >> /etc/samba/smb.conf << SAMBA_CONFIG
# Primary drive share - added by post-install script
[Primary]
comment = Primary Drive
path = $ACTUAL_HOME/drives/primary
browseable = yes
read only = no
writable = yes
valid users = $ACTUAL_USER
create mask = 0775
directory mask = 0775
SAMBA_CONFIG
echo "✓ Added [Primary] share to Samba configuration"
else
echo "Samba [Primary] share already configured, skipping..."
fi
# Add Samba user
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "SAMBA PASSWORD SETUP"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Set a password for Samba file sharing access."
echo "Tip: Using the same password as your system login is convenient."
echo ""
smbpasswd -a "$ACTUAL_USER"
# Enable and restart Samba services
systemctl enable smbd nmbd || echo "Warning: Failed to enable Samba services"
systemctl restart smbd nmbd || echo "Warning: Failed to restart Samba services"
echo ""
echo "✓ Samba configured successfully"
echo " Share name: Primary"
echo " Path: $ACTUAL_HOME/drives/primary"
echo " Access: \\\\$(hostname)\\Primary (Windows) or smb://$(hostname)/Primary (Mac/Linux)"
else
echo "✗ Samba installation failed, skipping configuration"
fi
else
echo "Skipping Samba installation."
fi
# Install NetBird # Install NetBird
echo "" echo ""
echo "Installing NetBird..." echo "Installing NetBird..."
@@ -281,7 +355,22 @@ if [ -f /tmp/rustdesk.deb ]; then
rm /tmp/rustdesk.deb rm /tmp/rustdesk.deb
fi fi
# Create rclone backup script and instructions # Rclone Split Backup System (Optional)
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "RCLONE SPLIT BACKUP SYSTEM (Optional)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "This sets up a split backup system using rclone:"
echo " - Creates mount points for primary + 2 backup drives"
echo " - Installs backup script that splits data across backup drives"
echo " - Optionally configures automatic daily backups"
echo ""
echo "Useful when: Primary drive (e.g., 4TB) > individual backup drives (e.g., 2TB each)"
echo ""
read -p "Set up rclone split backup system? (y/n): " SETUP_BACKUP
if [ "$SETUP_BACKUP" = "y" ] || [ "$SETUP_BACKUP" = "Y" ]; then
echo "" echo ""
echo "Setting up rclone backup configuration..." echo "Setting up rclone backup configuration..."
echo "" echo ""
@@ -567,7 +656,9 @@ TIMER
echo "✓ Rclone backup script created at /usr/local/bin/backup-scripts/rclone-backup.sh" echo "✓ Rclone backup script created at /usr/local/bin/backup-scripts/rclone-backup.sh"
echo "✓ Systemd service/timer created (disabled by default)" echo "✓ Systemd service/timer created (disabled by default)"
else
echo "Skipping rclone backup system setup."
fi
# Full system upgrade # Full system upgrade
echo "" echo ""
@@ -584,13 +675,17 @@ echo ""
echo "=== Installation Complete! ===" echo "=== Installation Complete! ==="
echo "" echo ""
echo "Installed Software:" echo "Installed Software:"
echo " ✓ net-tools, ncdu, git, curl, wget, vim, htop, tree, zip/unzip" echo " ✓ net-tools, ncdu, git, curl, wget, vim, htop, tree, zip/unzip, rclone"
echo " ✓ rclone - Backup/sync tool"
echo " ✓ OpenSSH Server - SSH remote access" echo " ✓ OpenSSH Server - SSH remote access"
echo " ✓ Samba - File sharing (Primary drive shared)"
echo " ✓ Docker Engine + Docker Compose" echo " ✓ Docker Engine + Docker Compose"
if [ "$INSTALL_SAMBA" = "y" ] || [ "$INSTALL_SAMBA" = "Y" ]; then
echo " ✓ Samba - File sharing (Primary drive shared)"
fi
echo " ✓ NetBird - Mesh VPN" echo " ✓ NetBird - Mesh VPN"
echo " ✓ RustDesk - Remote desktop" echo " ✓ RustDesk - Remote desktop"
if [ "$SETUP_BACKUP" = "y" ] || [ "$SETUP_BACKUP" = "Y" ]; then
echo " ✓ Rclone split backup system configured"
fi
echo "" echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "SSH AUTHENTICATION SETUP" echo "SSH AUTHENTICATION SETUP"
@@ -642,6 +737,7 @@ echo " ✓ Just GitHub or just Launchpad"
echo " ✓ Just NetBird SSH" echo " ✓ Just NetBird SSH"
echo " ✓ None (password auth only - if no keys imported)" echo " ✓ None (password auth only - if no keys imported)"
echo "" echo ""
if [ "$SETUP_BACKUP" = "y" ] || [ "$SETUP_BACKUP" = "Y" ]; then
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "RCLONE BACKUP SETUP - Exact Drive Mirroring" echo "RCLONE BACKUP SETUP - Exact Drive Mirroring"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@@ -852,10 +948,13 @@ echo " rclone check $ACTUAL_HOME/drives/primary/documents \\"
echo " $ACTUAL_HOME/drives/backup1/documents \\" echo " $ACTUAL_HOME/drives/backup1/documents \\"
echo " --checksum --one-way" echo " --checksum --one-way"
echo "" echo ""
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "OTHER IMPORTANT NOTES" echo "OTHER IMPORTANT NOTES"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "" echo ""
if [ "$INSTALL_SAMBA" = "y" ] || [ "$INSTALL_SAMBA" = "Y" ]; then
echo " Samba File Sharing:" echo " Samba File Sharing:"
if command -v smbd &> /dev/null && grep -q "\[Primary\]" /etc/samba/smb.conf 2>/dev/null; then if command -v smbd &> /dev/null && grep -q "\[Primary\]" /etc/samba/smb.conf 2>/dev/null; then
echo " ✓ Share 'Primary' is accessible at:" echo " ✓ Share 'Primary' is accessible at:"
@@ -865,9 +964,10 @@ echo " • Username: $ACTUAL_USER"
echo " • Use the Samba password you just set" echo " • Use the Samba password you just set"
echo "" echo ""
else else
echo " Not configured (Samba installation may have failed)" echo " ✗ Installation may have failed - check 'systemctl status smbd'"
echo "" echo ""
fi fi
fi
echo " Docker: Log out and back in for group membership to take effect" echo " Docker: Log out and back in for group membership to take effect"
echo "" echo ""
echo " NetBird:" echo " NetBird:"