Ubuntu server shuts down/sleeps
If you have installed a new ubuntu server and while using it, it just shuts down on you and the logs reveal that the system was suspending itself.
Below are the commands to diable sleep and hibernations.
sudo systemctl status
suspend.target
systemctl mask
sleep.target
suspend.target
hibernate.target
hybrid-sleep.target
sudo systemctl mask
sleep.target
suspend.target
hibernate.target
hybrid-sleep.target