sleep scripts
Does anyone have a good sleep script?
The commands below work great as long as I have superuser access and I type the command myself. I would like to come up with an idle script and have had much trouble doing this. I haven't found anything online. The only way I know to get idle time is from the "w" command but that is only based on individual programs and not the system. I also don't want to introduce a loop that will tax the processor too much. Any ideas on a good way to do this? Code:
echo mem|tee /sys/power/state |
im not sure if doing this going to work and if its safe but putting suid on your script might solve the problem .
make your scrip by super user and put sgid on it by chmod command. whenever a user exceute it , it will execute as super user. |
Right, I'm hoping to avoid that. what would be better if I could slip a couple of if statements in to a script periodically run with root permissions. The problem is that I don't know any scripts that are periodically run.
|
All times are GMT -5. The time now is 09:30 PM. |