diff --git a/debian.sh b/debian.sh index 8657e62..063de3b 100755 --- a/debian.sh +++ b/debian.sh @@ -33,8 +33,6 @@ EFI="/dev/$(lsblk | grep $HARD_DISK | head -2 | tail -1 | cut -c 7-20 | cut -d ' BTRFS="/dev/$(lsblk | grep $HARD_DISK | head -4 | tail -1 | cut -c 7-20 | cut -d ' ' -f1)" BOOT="/dev/$(lsblk | grep $HARD_DISK | head -3 | tail -1 | cut -c 7-20 | cut -d ' ' -f1)" ROOT_NAME='debian' -#NET_BACKUP='-t cifs -o username=guest,password=123456 //192.168.0.153/backup' -#HOME_BACKUP="root@server2:/raid/backup/home/" NET_BACKUP='/dev/disk/by-uuid/1a143f83-d4fe-4894-8e67-2b6d3baacea6' HOME_BACKUP="$TARGET/home" @@ -42,7 +40,7 @@ HOME_BACKUP="$TARGET/home" USER="verita84" USER_PASSWORD="123456" ROOT_PASSWORD="123456" -WIRELESS_PASSWORD='123456' +WIRELESS_PASSWORD='815721984' SSID='123456' WIRELESS_INTERFACE='wlan0' DISK_PASSWORD='123456' @@ -222,7 +220,6 @@ flatpaks() { done } - grub-snapshots(){ cd /opt git clone https://github.com/Antynea/grub-btrfs.git @@ -399,6 +396,30 @@ services() { } +server-config(){ + cp -f ./smb.conf /etc/samba/ + cp- f ./minidlna.conf /etc/ + cp -f ./99-sysctl.conf /etc/sysctl.d/ + cp -f *.service /etc/systemd/system/ + cp -f exports /etc/ + crontab > crontab + + SERVICES+=( minidlna vip containers pmie pmielogger nfs-server.service exim4 cockpit.socket redis-server smbd); + for i in "${SERVICES[@]}" + do + systemctl enable $i + done + + systemctl mask apparmor + systemctl disable --now exim4 + systemctl mask exim4 + rm -f /etc/systemd/system/default.target + ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target + systemctl isolate multi-user.target + apt remove gnome* gnome-* -y + apt autoremove -y +} + initialize-disk() { parted /dev/$HARD_DISK mklabel gpt parted /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB @@ -457,9 +478,18 @@ elif [ "$1" = "snapshot" ]; then snapshots elif [ "$1" = "backup" ]; then net-backup "$2" "$3" +elif [ "$1" = "server-config" ]; then + server-config elif [ "$1" = "grub-snapshots" ]; then grub-snapshots elif [ "$1" = "btrfs-tweaks" ]; then btrfs-tweaks elif [ "$1" = "restore" ]; then net-restore "$2" "$3" "$4" +elif [ "$1" = "remove-snapshot" ]; then + remove-snapshots +elif [ "$1" = "help" ]; then + show-help +else + show-help +fi