1

I want to disable suspend because my VPS goes into suspend and I cannot access it.

How I can do that?

Aaron
  • 6,714

3 Answers3

4

On Ubuntu 16.04 LTS, I successfully used the following to disable suspend:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

And this to re-enable it:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
-1

You can use gconf-editor

install that with

sudo apt-get install gconf-editor

and then look at

/apps/gnome-power-manager/timeout

Try setting sleep_computer_ac to 0

maybe help

Mahdi
  • 1,467
-1

This could have to do with that you are trying to run a bash script and that when you close your terminal it just quits this script, this is quite easy to solve.
Step 1 (install screen if not already installed)
sudo apt-get install screen

Step 2 (using it!)
Now before you run your script just run screen!

If you want to get back to it later try running screen -R
I hope this helped!