Merge branch 'master' of github.com:brunofontes/linuxShortcuts

This commit is contained in:
Bruno F. Fontes 2019-06-14 02:38:48 -03:00
commit 107b9a2f1d
9 changed files with 62 additions and 1 deletions

View File

@ -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" }'

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,5 @@
[Unit]
Description=Backup contabo db daily
[Service]
ExecStart=/home/bruno/Backups/Contabo/backup-db.sh

View File

@ -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

View File

@ -0,0 +1,5 @@
[Unit]
Description=Backup contabo files once per week
[Service]
ExecStart=/home/bruno/Backups/Contabo/backup-files.sh

View File

@ -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

2
Services/logError.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo /bin/systemctl status --full "$1" >> /home/bruno/.log_error

View File

@ -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