added potentially backup-this-device-script

This commit is contained in:
olli 2022-12-05 11:43:42 +01:00
parent 0346377a76
commit f8540acd11

23
mint.sh
View File

@ -16,6 +16,9 @@ whoami | grep -q ^root$ || read x
set -e
set -x
# Add User to docker group
sudo usermod -aG docker $(whoami)
# systemupdate
sudo apt-get update
sudo apt-get -y dist-upgrade
@ -47,15 +50,21 @@ do
sudo rm -rf ${playbook}
done
# Execute and chown .xsessionrc if exists
if [ -f ~/.xsessionrc ]
echo '
#!/bin/bash
if [ -f ~/Nextcloud/scripts/backup-this-device.sh ]
then
sudo chown $(whoami). ~/.xsessionrc
sudo chmod 700 ~/.xsessionrc
gnome-terminal --hide-menubar --title=BACKUP --geometry=120x35 -- bash ~/Nextcloud/scripts/backup-this-device.sh
elif [ -f ~/scripts/backup-this-device.sh ]
then
gnome-terminal --hide-menubar --title=BACKUP --geometry=120x35 -- bash ~/scripts/backup-this-device.sh
fi
# Add User to docker group
sudo usermod -aG docker $(whoami)
elif [ -f ~/.scripts/backup-this-device.sh ]
then
gnome-terminal --hide-menubar --title=BACKUP --geometry=120x35 -- bash ~/.scripts/backup-this-device.sh
fi
' >~/.xsessionrc
chmod 700 ~/.xsessionrc
# Autoupdate flatpak and cinnamon
dconf write /com/linuxmint/updates/auto-update-cinnamon-spices true