Topic
2 replies Latest Post - ‏2007-01-19T23:35:05Z by SystemAdmin
SystemAdmin
SystemAdmin
232 Posts
ACCEPTED ANSWER

Pinned topic Need... help...

‏2006-10-17T07:14:26Z |
I created a script... for now, we'll call this script "clean-up"
All it does is clean up some users that match certain criterias. I need to run this program at start-up everytime.... So I need to write a script to do this.

The way I was told to do this (I know... easier ways... already did them) is by starting the script through the rc files at boot time.... but only for run levels 2, 3 and 5... the script though terminate on itself if it runs on any other level. The rc script though start my "clean-up" script and then it'll sleep for five minutes.

I really have absolutely no clue where to even start. I would LOVE for someone to write up an entire example, but since this is for academia, and you feel I'd be cheated out of doing it myself, then helpful hints or suggests will be GREATLY appreciated. Thank you!
Updated on 2007-01-19T23:35:05Z at 2007-01-19T23:35:05Z by SystemAdmin
  • apsivam
    apsivam
    3 Posts
    ACCEPTED ANSWER

    Re: Need... help...

    ‏2006-11-20T11:03:11Z  in response to SystemAdmin
    I don't think you need a rc script for this just write shell script and inclue/call it from /etc/rc.local file thats it will not run on runleve 0 or 6

    --
    Cheers,
    Sivanandhan, P. (a.k.a. apsivam)
    [url]http://www.apsivam.in[/url]
    • SystemAdmin
      SystemAdmin
      232 Posts
      ACCEPTED ANSWER

      Re: Need... help...

      ‏2007-01-19T23:35:05Z  in response to apsivam
      Does it have to be every 5 minutes?
      Have you looked into using crontab for this type of thing?

      • goon12