fix
This commit is contained in:
parent
db5886c93b
commit
250ae146b1
38
debian.sh
38
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)"
|
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)"
|
BOOT="/dev/$(lsblk | grep $HARD_DISK | head -3 | tail -1 | cut -c 7-20 | cut -d ' ' -f1)"
|
||||||
ROOT_NAME='debian'
|
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'
|
NET_BACKUP='/dev/disk/by-uuid/1a143f83-d4fe-4894-8e67-2b6d3baacea6'
|
||||||
HOME_BACKUP="$TARGET/home"
|
HOME_BACKUP="$TARGET/home"
|
||||||
|
|
||||||
@ -42,7 +40,7 @@ HOME_BACKUP="$TARGET/home"
|
|||||||
USER="verita84"
|
USER="verita84"
|
||||||
USER_PASSWORD="123456"
|
USER_PASSWORD="123456"
|
||||||
ROOT_PASSWORD="123456"
|
ROOT_PASSWORD="123456"
|
||||||
WIRELESS_PASSWORD='123456'
|
WIRELESS_PASSWORD='815721984'
|
||||||
SSID='123456'
|
SSID='123456'
|
||||||
WIRELESS_INTERFACE='wlan0'
|
WIRELESS_INTERFACE='wlan0'
|
||||||
DISK_PASSWORD='123456'
|
DISK_PASSWORD='123456'
|
||||||
@ -222,7 +220,6 @@ flatpaks() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
grub-snapshots(){
|
grub-snapshots(){
|
||||||
cd /opt
|
cd /opt
|
||||||
git clone https://github.com/Antynea/grub-btrfs.git
|
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() {
|
initialize-disk() {
|
||||||
parted /dev/$HARD_DISK mklabel gpt
|
parted /dev/$HARD_DISK mklabel gpt
|
||||||
parted /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB
|
parted /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB
|
||||||
@ -457,9 +478,18 @@ elif [ "$1" = "snapshot" ]; then
|
|||||||
snapshots
|
snapshots
|
||||||
elif [ "$1" = "backup" ]; then
|
elif [ "$1" = "backup" ]; then
|
||||||
net-backup "$2" "$3"
|
net-backup "$2" "$3"
|
||||||
|
elif [ "$1" = "server-config" ]; then
|
||||||
|
server-config
|
||||||
elif [ "$1" = "grub-snapshots" ]; then
|
elif [ "$1" = "grub-snapshots" ]; then
|
||||||
grub-snapshots
|
grub-snapshots
|
||||||
elif [ "$1" = "btrfs-tweaks" ]; then
|
elif [ "$1" = "btrfs-tweaks" ]; then
|
||||||
btrfs-tweaks
|
btrfs-tweaks
|
||||||
elif [ "$1" = "restore" ]; then
|
elif [ "$1" = "restore" ]; then
|
||||||
net-restore "$2" "$3" "$4"
|
net-restore "$2" "$3" "$4"
|
||||||
|
elif [ "$1" = "remove-snapshot" ]; then
|
||||||
|
remove-snapshots
|
||||||
|
elif [ "$1" = "help" ]; then
|
||||||
|
show-help
|
||||||
|
else
|
||||||
|
show-help
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user