Manjaro-Pek / pacli

A simple and interative Bash Frontend for Pacman/Yaourt/Pacaur
GNU General Public License v2.0
44 stars 8 forks source link

Cron script to check for updates #9

Closed neton-bricio closed 8 years ago

neton-bricio commented 8 years ago

Create a shell script to check for updates. Set to auto run via Cron YXY hours.

Using cron to beneft OpenRC user.

Chrysostomus commented 8 years ago

I have update checking script available, part of lemonpanel package. Would this type of thing serve? https://github.com/Chrysostomus/lemonpanel/blob/master/bin/update-notifier

link is no longer working. new link: https://github.com/Chrysostomus/update-notifier

neton-bricio commented 8 years ago

Well it looks perfect. I will work to internationalization and climb everything back to Git Hub later.

Chrysostomus commented 8 years ago

Ok. I'll make it into a separate package and make pacli and lemonpanel depend on it.

excalibur1234 commented 8 years ago

now, the documentation and github page need to be updated with this cron script as dependency.

a short description how to use/activate the cron script would be nice, too.

Chrysostomus commented 8 years ago

That would make sense. However, I don't use cron, so I'm ill equipped to advice on the matter.

excalibur1234 commented 8 years ago

i use cron to regularly check for updates. but i use it in a non-standard way like that:

create ~/.crontab file and enter: * /7 * * \ yaourt -Sy execute the following command once (and every time the content of the ~/.crontab file changed): sudo crontab ~/.crontab -u root

i am reluctant to recommend this way to other users. i have heard of people, who have simply added a new file to /etc/cron.daily/ and manjaro automatically took care of running their script once a day. i have tried that method but always failed.

Chrysostomus commented 8 years ago

Yeah, synchronizing database as cronjob is risky if you don't know what you are doing. But update-notifier would work nicely if ran like that :-). I did not know one could have crontab in $HOME, thanks!

excalibur1234 commented 8 years ago

i just called that file .crontab but you can call it anyway you want. i think you can also place it anywhere you want.

the risky part about it is "-u root" this means that the file content of .crontab is run every 7 hours with root privileges. but everybody can change the file content of .crontab, because it is not located in my root directory.

excalibur1234 commented 8 years ago

i have just added update-notifier as optional dependency: 21007fda42185593150e3c2efff13fe702e9c475 also, i have added detailed descriptions how to use it: https://github.com/Chrysostomus/update-notifier/pull/2

this should conclude this issue.