Page 1 of 1

script to shutdown system - howto

Posted: Wed Jul 07, 2004 2:44 pm
by btfans
I run the proftpd in RH9 and allow u/l and d/l, how to write a script
such that it is cron to run after system start and yet it check

1) no traffic in proftpd (and to xferlog)
2) time is 02:30 am

Then, it issue system shutdown command for shutdown
shutdown -h now

Thanks,
Matthew

Posted: Wed Jul 07, 2004 7:20 pm
by crabyars
Do you know the linux commands to do what you ask? Sounds like you will need to write a shell script and call that from php with exec

Posted: Wed Jul 07, 2004 7:30 pm
by feyd
you know.. if you look down the list of topics in this forum, you'll see a topic on linux shutdown...