diff --git a/README.md b/README.md index ab4ba88..a05afeb 100755 --- a/README.md +++ b/README.md @@ -2,6 +2,18 @@ Debian 13 NETig configuration for `server` or `desktop` profiles. +What it does : +* Update the system +* Install a firewall +* Install a set of package accordingly to the selected profile +* Install Docker +* Add a ZRAM +* Apply any needed system configuration for your profile + +What it doesn't : +* Add `contrib` nor `non-free` repositories +* Configure the desktop for you + ## Prerequisites A fresh Debian 13 install without `Debian desktop environment` nor any desktop installed. @@ -17,22 +29,3 @@ Downlad and extract the archive : ``` And then run the `./run.sh` script and choose your profile. - -## Manual tasks - -### Server - -Edit crontab with : -``` -# crontab -e -``` - -And add the following content : -``` -# Run the NETig backup script at 4h every monday -0 4 * * mon /usr/local/sbin/netig-srv-backup -``` - -### Desktop - -There is nothing to do, your system is ready to enjoy ! diff --git a/modules/config.sh b/modules/config.sh index 1751149..f141b16 100755 --- a/modules/config.sh +++ b/modules/config.sh @@ -4,11 +4,6 @@ echo echo " => Configuration" echo -if [ $profile = server ]; then - # Copy scripts - cp scripts/* /usr/local/sbin -fi - if [ $profile = desktop ]; then # Disable all managed interfaces excerpt loopback from /etc/network/interfaces file to allow NetworkManager to manage them sed -i '/# The primary network interface/Q' /etc/network/interfaces diff --git a/modules/repos.sh b/modules/repos.sh deleted file mode 100755 index 4a11632..0000000 --- a/modules/repos.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -echo -echo " => Repositories" -echo - -grep -E "(contrib|non-free)" /etc/apt/sources.list > /dev/null 2>&1 -if [ $? -ne 0 ]; then - echo "Adding contrib and non-free repositories to /etc/apt/sources.list" - sed -i "s/http:\/\/deb.debian.org\/debian\/ trixie main non-free-firmware/& contrib non-free/" /etc/apt/sources.list - sed -i "s/http:\/\/security.debian.org\/debian-security trixie-security main non-free-firmware/& contrib non-free/" /etc/apt/sources.list - sed -i "s/http:\/\/deb.debian.org\/debian\/ trixie-updates main non-free-firmware/& contrib non-free/" /etc/apt/sources.list -fi diff --git a/run.sh b/run.sh index 9538cc0..c50d4ae 100755 --- a/run.sh +++ b/run.sh @@ -29,8 +29,7 @@ do esac done -modules="repos.sh - updates.sh +modules="updates.sh firewall.sh pkgs.sh docker.sh diff --git a/scripts/netig-srv-backup b/scripts/netig-srv-backup deleted file mode 100755 index 5e8d013..0000000 --- a/scripts/netig-srv-backup +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -################################################################################ -### Variables - -# Source directory -source="/var/netig/srv" - -# Destination directory -destination="/var/netig/bak" - -# Backup file name -backup="bak_$(hostname -f)_$(date +"%Y%m%d").tar.zst" - -################################################################################ -### Down services - -( cd /var/netig/srv/status.netig.net && docker compose down ) - -for f in /var/netig/srv/* -do - if [ -d "$f" ]; then - cd $f - docker compose down - fi -done - -################################################################################ -### Making the backup archive - -echo -echo " Making the backup archive." -echo -tar --zstd -cf $destination/$backup -C $source . - -################################################################################ -### Up services - -for f in /var/netig/srv/* -do - if [ -d "$f" ]; then - cd $f - if [ -d "django" ] - then - docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d - else - docker compose up -d - fi - fi -done - -################################################################################ -### Remove destination archives older than n days -find $destination -name "bak_*" -type f -mtime +20 -delete - -################################################################################ -### End message - -echo -echo " Backup done." -echo