Update lxcpost.sh
This commit is contained in:
+2
-22
@@ -1,21 +1,16 @@
|
|||||||
# Script for LXC Post-Procedure with Prompts
|
#!/bin/bash
|
||||||
|
|
||||||
Below is a script designed to guide you through the post-procedure setup for LXC. This script includes prompts for user inputs such as usernames, passwords, and IP addresses.
|
Below is a script designed to guide you through the post-procedure setup for LXC. This script includes prompts for user inputs such as usernames, passwords, and IP addresses.
|
||||||
|
|
||||||
## Install Unattended-Upgrades Package
|
## Install Unattended-Upgrades Package
|
||||||
|
|
||||||
```bash
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Update package list and install unattended-upgrades
|
# Update package list and install unattended-upgrades
|
||||||
echo "Updating package list and installing unattended-upgrades..."
|
echo "Updating package list and installing unattended-upgrades..."
|
||||||
apt update
|
apt update
|
||||||
apt install unattended-upgrades -y
|
apt install unattended-upgrades -y
|
||||||
```
|
|
||||||
|
|
||||||
## Edit Configuration
|
## Edit Configuration
|
||||||
|
|
||||||
```bash
|
|
||||||
# Open the configuration file for editing
|
# Open the configuration file for editing
|
||||||
echo "Opening configuration file for editing..."
|
echo "Opening configuration file for editing..."
|
||||||
nano /etc/apt/apt.conf.d/50unattended-upgrades
|
nano /etc/apt/apt.conf.d/50unattended-upgrades
|
||||||
@@ -35,21 +30,13 @@ echo "Unattended-Upgrade::Mail \"$email\";" >> /etc/apt/apt.conf.d/50unattended-
|
|||||||
|
|
||||||
# Save and close the file
|
# Save and close the file
|
||||||
echo "Save the file by pressing [Ctrl+O] and exit with [Ctrl+X]."
|
echo "Save the file by pressing [Ctrl+O] and exit with [Ctrl+X]."
|
||||||
```
|
|
||||||
|
|
||||||
## Enable Automatic Updates
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Enable automatic updates
|
# Enable automatic updates
|
||||||
echo "Enabling automatic updates..."
|
echo "Enabling automatic updates..."
|
||||||
dpkg-reconfigure --priority=low unattended-upgrades
|
dpkg-reconfigure --priority=low unattended-upgrades
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Tailscale Installation
|
## Tailscale Installation
|
||||||
|
|
||||||
```bash
|
|
||||||
# Install Tailscale
|
# Install Tailscale
|
||||||
echo "Installing Tailscale..."
|
echo "Installing Tailscale..."
|
||||||
curl -fsSL https://tailscale.com/install.sh | sh
|
curl -fsSL https://tailscale.com/install.sh | sh
|
||||||
@@ -61,19 +48,15 @@ tailscale up
|
|||||||
# Add autoupdate
|
# Add autoupdate
|
||||||
echo "Enabling autoupdate for Tailscale..."
|
echo "Enabling autoupdate for Tailscale..."
|
||||||
tailscale set --auto-update
|
tailscale set --auto-update
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Add CIFS Folder to LXC
|
## Add CIFS Folder to LXC
|
||||||
|
|
||||||
```bash
|
|
||||||
# Install cifs-utils
|
# Install cifs-utils
|
||||||
echo "Installing cifs-utils..."
|
echo "Installing cifs-utils..."
|
||||||
apt install cifs-utils -y
|
apt install cifs-utils -y
|
||||||
|
|
||||||
# Create mount folder
|
# Create mount folder
|
||||||
echo "Creating mount folder..."
|
echo "Creating mount folder for Synology Shared folder..."
|
||||||
mkdir /media/synolager
|
mkdir /media/synolager
|
||||||
echo "You can rename the folder as desired, but remember it for the following steps."
|
echo "You can rename the folder as desired, but remember it for the following steps."
|
||||||
|
|
||||||
@@ -112,6 +95,3 @@ echo "//${syno_ip}/${shared_folder} /media/synolager cifs credentials=/etc/synoc
|
|||||||
# Mount the share
|
# Mount the share
|
||||||
echo "Mounting the share..."
|
echo "Mounting the share..."
|
||||||
sudo mount /media/synolager
|
sudo mount /media/synolager
|
||||||
```
|
|
||||||
|
|
||||||
This script will guide you through installing and configuring necessary packages, setting up Tailscale, and adding a CIFS folder to your LXC environment. Be sure to follow the prompts and enter the required information when asked.
|
|
||||||
Reference in New Issue
Block a user