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.
|
||||
|
||||
## Install Unattended-Upgrades Package
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
# Update package list and install unattended-upgrades
|
||||
echo "Updating package list and installing unattended-upgrades..."
|
||||
apt update
|
||||
apt install unattended-upgrades -y
|
||||
```
|
||||
|
||||
## Edit Configuration
|
||||
|
||||
```bash
|
||||
# Open the configuration file for editing
|
||||
echo "Opening configuration file for editing..."
|
||||
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
|
||||
echo "Save the file by pressing [Ctrl+O] and exit with [Ctrl+X]."
|
||||
```
|
||||
|
||||
## Enable Automatic Updates
|
||||
|
||||
```bash
|
||||
# Enable automatic updates
|
||||
echo "Enabling automatic updates..."
|
||||
dpkg-reconfigure --priority=low unattended-upgrades
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tailscale Installation
|
||||
|
||||
```bash
|
||||
# Install Tailscale
|
||||
echo "Installing Tailscale..."
|
||||
curl -fsSL https://tailscale.com/install.sh | sh
|
||||
@@ -61,19 +48,15 @@ tailscale up
|
||||
# Add autoupdate
|
||||
echo "Enabling autoupdate for Tailscale..."
|
||||
tailscale set --auto-update
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Add CIFS Folder to LXC
|
||||
|
||||
```bash
|
||||
# Install cifs-utils
|
||||
echo "Installing cifs-utils..."
|
||||
apt install cifs-utils -y
|
||||
|
||||
# Create mount folder
|
||||
echo "Creating mount folder..."
|
||||
echo "Creating mount folder for Synology Shared folder..."
|
||||
mkdir /media/synolager
|
||||
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
|
||||
echo "Mounting the share..."
|
||||
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