![]() |
|
#1
|
||||
|
||||
|
Hello all again. I am participating in running F@H & I would like some help on how to add to my script a command to shut down the pc once the work-unit is done. I have F@H installed under my /home directory and use a script that runs in a terminal window. When the unit is done it automatically closes the terminal but I would also like it to shut down the pc. I run Xubuntu 11.04 64-bit. Here is the script:
Code:
I google'd but to no avail. |
|
#2
|
|||
|
|||
|
There are many options.
First you can add a shutdown command at the end of that script, provided fah runs in foreground. Second, you can create a symbolic link when that script starts and delete it when it adds, then have cron run every minute or so a script that check for the existence of the link; if it's there, don't shutdown and vice versa. And many others. But the way you describe it, adding a shutdown option at the end would work great. Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
|
#3
|
||||
|
||||
|
Which command should I use?
Code:
__________________
Xubuntu 11.04 64-Bit E6750@3.3 4GB OCZ DDR2 Sapphire 4850 HD WD 320 Sata 3.0 XFI XtremeGamer |
|
#4
|
|||
|
|||
|
I meant in the bash script, add another line that reads shutdown <options>.
You can test with echo "shutdown" to make sure the command is not executed too early. Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
| « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|
|