diff --git a/Android/android-backup.sh b/Android/android-backup.sh index 5a8a516..63664eb 100755 --- a/Android/android-backup.sh +++ b/Android/android-backup.sh @@ -1 +1,4 @@ -adb backup -apk -shared -all -f /run/media/bruno/Multimedia/My\ Backups/android_backup.ab && kdialog --title "Android Backup Complete" --msgbox "Android Backup finished successfully" + +time adb backup -apk -shared -all -f /run/media/bruno/Multimedia/My\ Backups/android_backup.ab && kdialog --title "Android Backup Complete" --msgbox "Android Backup finished successfully" +echo +ls -lh /run/media/bruno/Multimedia/My\ Backups/android_backup.ab | gawk '{ printf $5 " "; for(i=6;i<=NF;i++) printf $i " "; print "\n" }' diff --git a/Pacman/clean_package_cache.hook b/Pacman/clean_package_cache.hook new file mode 100644 index 0000000..5d0394d --- /dev/null +++ b/Pacman/clean_package_cache.hook @@ -0,0 +1,11 @@ +# Copy this file into /etc/pacman.d/hooks folder +[Trigger] +Operation = Upgrade +Operation = Install +Operation = Remove +Type = Package +Target = * +[Action] +Description = Bruno: Cleaning pacman cache... +When = PostTransaction +Exec = /usr/bin/paccache -r diff --git a/Pacman/clean_uninstalled_packages.hooks b/Pacman/clean_uninstalled_packages.hooks new file mode 100644 index 0000000..e69c2a5 --- /dev/null +++ b/Pacman/clean_uninstalled_packages.hooks @@ -0,0 +1,9 @@ +# Copy this file into /etc/pacman.d/hooks folder +[Trigger] +Operation = Remove +Type = Package +Target = * +[Action] +Description = Bruno: Cleaning removed packages pacman cache... +When = PostTransaction +Exec = /usr/bin/paccache -ruk0 diff --git a/Services/backup-contabo-db.service b/Services/backup-contabo-db.service new file mode 100644 index 0000000..83f2e7d --- /dev/null +++ b/Services/backup-contabo-db.service @@ -0,0 +1,5 @@ +[Unit] +Description=Backup contabo db daily + +[Service] +ExecStart=/home/bruno/Backups/Contabo/backup-db.sh diff --git a/Services/backup-contabo-db.timer b/Services/backup-contabo-db.timer new file mode 100644 index 0000000..4f75156 --- /dev/null +++ b/Services/backup-contabo-db.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Backup contabo db dayly + +[Timer] +#DayOfWeek Year-Month-Day Hour:Minute:Second +OnCalendar=*-*-* 10:00:00 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/Services/backup-contabo-files.service b/Services/backup-contabo-files.service new file mode 100644 index 0000000..01c813e --- /dev/null +++ b/Services/backup-contabo-files.service @@ -0,0 +1,5 @@ +[Unit] +Description=Backup contabo files once per week + +[Service] +ExecStart=/home/bruno/Backups/Contabo/backup-files.sh diff --git a/Services/backup-contabo-files.timer b/Services/backup-contabo-files.timer new file mode 100644 index 0000000..0e45f51 --- /dev/null +++ b/Services/backup-contabo-files.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Backup contabo files once per week + +[Timer] +#DayOfWeek Year-Month-Day Hour:Minute:Second +OnCalendar=Mon *-*-* 11:00:00 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/Services/logError.sh b/Services/logError.sh new file mode 100755 index 0000000..5643ef5 --- /dev/null +++ b/Services/logError.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo /bin/systemctl status --full "$1" >> /home/bruno/.log_error diff --git a/Services/logErrors@.service b/Services/logErrors@.service new file mode 100644 index 0000000..68a257a --- /dev/null +++ b/Services/logErrors@.service @@ -0,0 +1,6 @@ +[Unit] +Description=Log Systemd errors on my %i script on home + +[Service] +ExecStart=/home/bruno/Apps/linuxShortcuts/Services/logError.sh %i +#ExecStart=/bin/systemctl status --full %i >> /home/bruno/.log_error