You are not logged in.
Pages: 1
For certain reasons I want to automate my system so it does "pacman -Sy" every hour.
I wrote a little bash script as root, used chmod 700 to make it executable and stuck it in /etc/cron.hourly/
This is the script:
#!/bin/sh
exec pacman -Sy
Will this work?
Last edited by thatnewyorker (2010-05-21 02:01:43)
R.I.P In Pieces
Offline
Offline
Yes
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Are you guys sure? It doesn't seem to be working. ![]()
R.I.P In Pieces
Offline
Well you just need to do the following command to understand what pacman is actually doing
man pacman(Using man will give a lot of information on different functions.)
In your case if you want to update your whole system everyhour you should use sonething like -Syu and as you want it to run in background you should ask him to be quiet. I let you find this option in man ^^
But doing such a thing is quite risky in my opinion, because you might and will miss useful information about package. If you relly want to do this output the stdout of pacman to a file, by using something like this
pacman > test.logLast edited by lymphatik (2010-05-20 18:01:57)
Offline
used chmod 700 to make it executable
Who is the owner of the file? If is not root, I don't think that will work.
Edit: I re-read your post and I see you created it as root. You might check that none-the-less
Last edited by ewaller (2010-05-20 18:32:14)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I don't want to automatically update the system, just refresh the package list. I'm using Awesome window manager and have vicious widget that shows me how many updates I have available by using pacman -Qu. I figure its practically useless unless I have pacman -Sy running regularly in the background.
Well you just need to do the following command to understand what pacman is actually doing
man pacman(Using man will give a lot of information on different functions.)
In your case if you want to update your whole system everyhour you should use sonething like -Syu and as you want it to run in background you should ask him to be quiet. I let you find this option in man ^^
But doing such a thing is quite risky in my opinion, because you might and will miss useful information about package. If you relly want to do this output the stdout of pacman to a file, by using something like this
pacman > test.log
R.I.P In Pieces
Offline
Is the cron daemon running?
Review /var/log/cron.log
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Nevermind guys, I figured it out. Thanks for the concern though:D
R.I.P In Pieces
Offline
@thatnewyorker:
First of all, it would be nice if you could let us know what you did to solve your problem.
Secondly: If your question is answered, please mark your threat as [SOLVED] (just edit your first post).
Thanks.
Anyway, you may also try the following:
-- Pacman widget
pacwidget = widget({ type = "textbox" })
vicious.register(pacwidget, vicious.widgets.pacman,
function (widget, args)
if args[1] == 0 then
return "<span color='#a2bbff'>Nothing</span>"
else
return "<span color='#a2bbff'>" .. args[1] .. " Updates</span>"
end
end)
pacwidget:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.util.spawn (terminal .. " -e sudo clyde -Sy" ) end ),
awful.button({ }, 3, function () awful.util.spawn (terminal .. " -e sudo clyde -Syu" ) end )
)
)
pacicon = widget({ type = "imagebox" })
pacicon.image = image("/home/jack/.config/awesome/icons/pac18.png")
pacicon:buttons(pacwidget:buttons())Offline
Pages: 1