i use terminal to shutdown my system by
calculating the time for my downloads and uses the command 'sudo
shutdown -h +time'.....how can i implement this using python script
I cant understand what you want the python script to do.
But bash was designed as a "Process Controll Language" for this
purpose. You can just do
<code>
#!/bin/bash
if [ $EUID -ne 0];
then
echo "Need to be root to shutdown"
fi
wget #whatver
shutdown -h -P now
</code>
If you use free download hours of asianet you can use the shutdown script at
http://dropointftp.t35.com/down
It shuts down the system automatically by default at 7.45am.
You can shutdown at another time automatically by running it as
./down 19 45
[Shutdown at 7.45pm]
It also puts a log in the current directory when shutdown was successful.
--
"Freedom is the only law".
"Freedom Unplugged"
http://www.ilug-tvm.org
You received this message because you are subscribed to the Google
Groups "ilug-tvm" group.
To control your subscription visit
http://groups.google.co.in/group/ilug-tvm/subscribe
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For details visit the google group page:
http://groups.google.com/group/ilug-tvm?hl=en