0- Keep a source clean config directory to sync. with it, so you can make a clean up once a week or so.
sudo rsync -aAXv --delete $bootop/opera.bak/ $bootop/opera/
1- Keep bookmarks directory outside sync. so you can keep them after clean up sync.
/home/user/scripts/operaBookmarks/ (bookmarks linked outside config chrome directory, to keep them)
2- Protect Extensions directory, so they cant hack you with any troyan plugin.
sudo chattr +i $bootop/opera/Extensions/
-----------------
I use two scripts; opeinit (make a clean up sync of config directory) and opeupd (update some data changes to clean source directory)
opeinit
Code: Select all
#!/bin/sh
#
export bootop=/home/user/LINUXDEBS/browsers
killall opera
sudo chattr +i $bootop/opera/Extensions/ $bootop/opera.bak/Extensions/
cp -f $bootop/opera/Bookmarks* $bootop/opera.bak/
cp -f $bootop/opera/Bookmarks* /home/user/scripts/operaBookmarks/
sudo rsync -aAXv --delete $bootop/opera.bak/ $bootop/opera/
Code: Select all
#!/bin/bash
#
bootop=/home/user/LINUXDEBS/browsers/
killall opera
sudo chattr +i $bootop/opera/Extensions/ $bootop/opera.bak/Extensions/
cp -f $bootop/opera/Bookmarks* /home/user/scripts/operaBookmarks/
rsync -aAXv --delete $bootop/opera/ $bootop/opera.bak/