ianw1974 Posted October 27, 2005 Report Share Posted October 27, 2005 I had an idea (don't worry, didn't hurt that much :P ), about a script to run at startup to something along the lines of the following: urpmi.update -a urpmi --auto-select --auto I realise I could log into the system and then just run this manually, is there any way I could get it to run once the system is up-and-running, but without login. And if so, where would be by best place to stash it? What I'm intending to do is just get the system up-to-date with security updates, etc. So maybe the --auto-select --auto isn't the correct parameter I would be wanting to use. Although this would ensure that completely everything is up-to-date. Idea's very much appreciated. Quote Link to comment Share on other sites More sharing options...
geekbrains Posted October 27, 2005 Report Share Posted October 27, 2005 Dude, My cron.daily runs a script like this #!/bin/bash urpmi.update -a urpmi urpmi urpmi --update --auto --auto-select and it works perfect Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 27, 2005 Author Report Share Posted October 27, 2005 Nice one! Does it matter what I name the file and where I store it? I found a /etc/cron.daily directory, would this be the place for it? Is it just a case of storing in the directory, and then the job get's run? Quote Link to comment Share on other sites More sharing options...
geekbrains Posted October 27, 2005 Report Share Posted October 27, 2005 Name doesn't matter dude, I've named mine as upd.cron and it should be in the cron.daily directory. Make sure that you chmod it to +x :P Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 27, 2005 Author Report Share Posted October 27, 2005 OK, cool. I called it sysupdates :P Done the chmod +x and put it in /etc/cron.daily Many thanks :D Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 27, 2005 Author Report Share Posted October 27, 2005 One more thing, which log file would I need to check to see that the update and or job/run was successful. Quote Link to comment Share on other sites More sharing options...
geekbrains Posted October 27, 2005 Report Share Posted October 27, 2005 One more thing, which log file would I need to check to see that the update and or job/run was successful. <{POST_SNAPBACK}> Dude normally, when a cron job is completed, the error message (if available) and the output of the cron job is mailed to the root. You can check it out by viewing /etc/crontab there'll be something listed like SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ Further log files can be found at /var/log/cron and /var/log/messages Quote Link to comment Share on other sites More sharing options...
aioshin Posted October 27, 2005 Report Share Posted October 27, 2005 Dude normally, when a cron job is completed, the error message (if available) and the output of the cron job is mailed to the root. You can check it out by viewing /etc/crontab there'll be something listed like SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ i'd like to add, make sure postfix runs on your system and alias root to your regular email account in order for you to recieve that email on that regular email acct of yours... or you can directly replace the part.. ex.. MAILTO=ian74@yourmail.com Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 27, 2005 Author Report Share Posted October 27, 2005 Cool, I got postfix configured and running too, so that should all be OK. If the alias isn't pointed to my account, I presume it will just stay in the root mailbox anyhow? This is OK, since I can check it through webmin. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 27, 2005 Author Report Share Posted October 27, 2005 Actually, I decided to change it :P I went into webmin, then postfix and mail aliases, and changed root from pointing to postfix, to pointing to my user id instead. Quote Link to comment Share on other sites More sharing options...
devries Posted October 27, 2005 Report Share Posted October 27, 2005 https://mandrivausers.org/index.php?showtopic=27059&hl= Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.