Merge pull request #1 from outis1one/claude/review-repo-docs-QFDqX
Claude/review repo docs qf dq x
This commit is contained in:
@@ -56,12 +56,12 @@ Automated setup script for Ubuntu 24.04 Desktop that installs essential tools, c
|
||||
### 1. Download the Script
|
||||
|
||||
```bash
|
||||
# Download (replace URL with actual location)
|
||||
wget https://your-domain.com/post-install.sh
|
||||
# Clone the repository
|
||||
git clone https://github.com/outis1one/post-ubuntu-install.git
|
||||
cd post-ubuntu-install
|
||||
|
||||
# Or create manually
|
||||
nano post-install.sh
|
||||
# Paste the script content and save (Ctrl+O, Enter, Ctrl+X)
|
||||
# Or download the script directly
|
||||
wget https://raw.githubusercontent.com/outis1one/post-ubuntu-install/main/ubuntu-post-install.sh -O post-install.sh
|
||||
```
|
||||
|
||||
### 2. Make Executable
|
||||
+106
-6
@@ -243,6 +243,80 @@ echo "Verifying Docker installation..."
|
||||
docker --version || echo "Warning: Docker 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
|
||||
echo ""
|
||||
echo "Installing NetBird..."
|
||||
@@ -281,7 +355,22 @@ if [ -f /tmp/rustdesk.deb ]; then
|
||||
rm /tmp/rustdesk.deb
|
||||
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 "Setting up rclone backup configuration..."
|
||||
echo ""
|
||||
@@ -567,7 +656,9 @@ TIMER
|
||||
|
||||
echo "✓ Rclone backup script created at /usr/local/bin/backup-scripts/rclone-backup.sh"
|
||||
echo "✓ Systemd service/timer created (disabled by default)"
|
||||
|
||||
else
|
||||
echo "Skipping rclone backup system setup."
|
||||
fi
|
||||
|
||||
# Full system upgrade
|
||||
echo ""
|
||||
@@ -584,13 +675,17 @@ echo ""
|
||||
echo "=== Installation Complete! ==="
|
||||
echo ""
|
||||
echo "Installed Software:"
|
||||
echo " ✓ net-tools, ncdu, git, curl, wget, vim, htop, tree, zip/unzip"
|
||||
echo " ✓ rclone - Backup/sync tool"
|
||||
echo " ✓ net-tools, ncdu, git, curl, wget, vim, htop, tree, zip/unzip, rclone"
|
||||
echo " ✓ OpenSSH Server - SSH remote access"
|
||||
echo " ✓ Samba - File sharing (Primary drive shared)"
|
||||
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 " ✓ RustDesk - Remote desktop"
|
||||
if [ "$SETUP_BACKUP" = "y" ] || [ "$SETUP_BACKUP" = "Y" ]; then
|
||||
echo " ✓ Rclone split backup system configured"
|
||||
fi
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "SSH AUTHENTICATION SETUP"
|
||||
@@ -642,6 +737,7 @@ echo " ✓ Just GitHub or just Launchpad"
|
||||
echo " ✓ Just NetBird SSH"
|
||||
echo " ✓ None (password auth only - if no keys imported)"
|
||||
echo ""
|
||||
if [ "$SETUP_BACKUP" = "y" ] || [ "$SETUP_BACKUP" = "Y" ]; then
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "RCLONE BACKUP SETUP - Exact Drive Mirroring"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
@@ -852,10 +948,13 @@ echo " rclone check $ACTUAL_HOME/drives/primary/documents \\"
|
||||
echo " $ACTUAL_HOME/drives/backup1/documents \\"
|
||||
echo " --checksum --one-way"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "OTHER IMPORTANT NOTES"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
if [ "$INSTALL_SAMBA" = "y" ] || [ "$INSTALL_SAMBA" = "Y" ]; then
|
||||
echo " Samba File Sharing:"
|
||||
if command -v smbd &> /dev/null && grep -q "\[Primary\]" /etc/samba/smb.conf 2>/dev/null; then
|
||||
echo " ✓ Share 'Primary' is accessible at:"
|
||||
@@ -865,9 +964,10 @@ echo " • Username: $ACTUAL_USER"
|
||||
echo " • Use the Samba password you just set"
|
||||
echo ""
|
||||
else
|
||||
echo " Not configured (Samba installation may have failed)"
|
||||
echo " ✗ Installation may have failed - check 'systemctl status smbd'"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
echo " Docker: Log out and back in for group membership to take effect"
|
||||
echo ""
|
||||
echo " NetBird:"
|
||||
|
||||
Reference in New Issue
Block a user