Added post-install script for setting up snapshots
This commit is contained in:
parent
59fbccbb31
commit
5c58bffab1
1 changed files with 38 additions and 0 deletions
38
lmde-postinstall.sh
Normal file
38
lmde-postinstall.sh
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
apt install -y snapper inotify-tools git make
|
||||||
|
|
||||||
|
pushd /
|
||||||
|
|
||||||
|
umount /.snapshots
|
||||||
|
rm -r .snapshots
|
||||||
|
snapper -c root create-config /
|
||||||
|
btrfs subvolume delete /.snapshots
|
||||||
|
mkdir /.snapshots
|
||||||
|
mount -av
|
||||||
|
|
||||||
|
systemctl disable snapper-boot.timer
|
||||||
|
snapper -c root set-config 'TIMELINE_CREATE=no'
|
||||||
|
snapper -c root set-config 'ALLOW_GROUPS=sudo'
|
||||||
|
snapper -c root set-config 'SYNC_ACL=yes'
|
||||||
|
snapper -c root set-config 'NUMBER_LIMIT=10'
|
||||||
|
snapper -c root set-config 'NUMBER_LIMIT_IMPORTANT=10'
|
||||||
|
snapper -c root set-config 'TIMELINE_MIN_AGE=1800'
|
||||||
|
snapper -c root set-config 'TIMELINE_LIMIT_HOURLY=5'
|
||||||
|
snapper -c root set-config 'TIMELINE_LIMIT_DAILY=7'
|
||||||
|
snapper -c root set-config 'TIMELINE_LIMIT_WEEKLY=1'
|
||||||
|
snapper -c root set-config 'TIMELINE_LIMIT_MONTHLY=0'
|
||||||
|
snapper -c root set-config 'TIMELINE_LIMIT_YEARLY=0'
|
||||||
|
|
||||||
|
snapper -c root create --description "Fresh install"
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
git clone https://github.com/Antynea/grub-btrfs.git
|
||||||
|
cd grub-btrfs
|
||||||
|
make install
|
||||||
|
systemctl enable --now grub-btrfsd
|
||||||
|
update-grub2
|
||||||
|
cd /tmp
|
||||||
|
rm -rf grub-btrfs
|
||||||
|
|
||||||
|
popd
|
Loading…
Reference in a new issue