first commit

This commit is contained in:
julien
2024-12-03 00:49:51 +01:00
commit ba023e9f59
11 changed files with 244 additions and 0 deletions

29
modules/docker.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
#############
### Docker
echo
echo " => Docker"
echo
if [ -f /usr/bin/docker ]
then
echo " -> Already done !"
else
# Add Docker's official GPG key
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg --yes
chmod a+rx /etc/apt/keyrings
chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources
echo \
"deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable" \
| tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
# Install packages
apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
fi

15
modules/pkgs.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
#######################
### Install packages
echo
echo " => Packages"
echo
pkglist="git
htop
tree
rsync"
apt-get install $pkglist -y

10
modules/repos.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
###########################
### Repos configuration
echo
echo " => Repos configuration"
echo
cp config/sources.list /etc/apt/sources.list

10
modules/scripts.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
###################
### Copy scripts
echo
echo " => Scripts"
echo
cp scripts/* /usr/local/sbin

11
modules/update.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
#############
### Update
echo
echo " => Update"
echo
apt-get update
apt-get upgrade -y

28
modules/volumes.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
##########################
### Volumes mountpoints
echo
echo " => Volumes mountpoints"
echo
if [ -d /var/netig/srv ]
then
echo " -> Already done !"
else
mkdir -p /var/netig/srv
echo
echo " => Adjust /etc/fstab accordingly !"
echo
fi
if [ -d /var/netig/bak ]
then
echo " -> Already done !"
else
mkdir -p /var/netig/bak
echo
echo " => Adjust /etc/fstab accordingly !"
echo
fi

19
modules/zram.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
###########
### ZRAM
echo
echo " => ZRAM"
echo
if [ -f /usr/bin/zramswap ]
then
echo " -> Already done !"
else
apt-get install zram-tools -y
sed -i '/#ALGO=lz4/s/^#//g' /etc/default/zramswap
sed -i '/#PERCENT=50/s/^#//g' /etc/default/zramswap
sed -i 's/ALGO=lz4/ALGO=zstd/g' /etc/default/zramswap
systemctl restart zramswap.service
fi