Page 1 of 1

Shell script

Posted: Tue Apr 12, 2016 1:41 pm
by xteriumsupport
Hello all, i am a beginner with servers and i have a small problem
WHen my server reboot or restart in the middle of the night then i need to wake up to launch some commands as some processes dont launch automaticaly, here are the 4 command line i need to input each time manualy. is there a way to make this automaticaly so i dont need to log each time as its hurt my game reputation, i have really no idea where to start for this
In case of i am using centos 7

# service nginx start
# service nginx status
# /etc/init.d/vesta start
# service httpd start

This is where i started

#!/bin/bash
echo “Starting up nginx environment…”
service nginx start
echo “Status nginx environment…”
service nginx status
echo “Starting up vesta environment…”
/etc/init.d/vesta start
echo “Starting up httpd environment…”
service httpd start
echo "Server restarted succesfully."

And i added in the crontab file @reboot /startup.sh

Regards

Re: Shell script

Posted: Fri Apr 22, 2016 1:51 pm
by skurudo
Yeah, we have this bug in russian branch -> https://bugs.vestacp.com/issues/163

Can you check this after reboot ?

Code: Select all

service httpd status -l
service nginx status -l
service named status -l