ibi

mystart.sh

ibi
Feb 2nd, 2022 (edited)
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #!/bin/sh
  2. # run with @reboot in crontab
  3. # make ramdisk subdirs
  4. mkdir -p /mnt/ramdisk/caches/steam
  5. mkdir -p /mnt/ramdisk/temp
  6. # sysinf & config backup
  7. cd ~
  8. # last reboot > ~/logs/lastreboot.log
  9. inxi -v4 -c0 > ~/.bck/inxi_$(hostname).txt
  10. rar u -as -x*imapcache* -x*.iso ~/.bck/cfg_$(hostname).rar ~/.config/* ~/.mo* ~/.sylph* ~/.bashrc /etc/*tab* /etc/samba/*.conf
  11. # unzip chromium profile
  12. cd /mnt/ramdisk/caches/
  13. 7z x -y ~/.bck/cprfl.zip
  14. # copy to network share
  15. cp -fpuv ~/.bck/* /mnt/piggy/autosave/$(hostname)/lnx/ > ~/logs/cp_mystart.log
  16. # rsync -v ~/.bck/* /mnt/piggy/autosave/$(hostname)/lnx/ | tee /mnt/piggy/logs/autosave_$(hostname).log
  17.  
Add Comment
Please, Sign In to add comment