Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Scripting / API
  • Search

Shell script

Questions regarding the API
Application Programming Interface
Locked
  • Print view
Advanced search
2 posts • Page 1 of 1
xteriumsupport
Posts: 1
Joined: Tue Apr 12, 2016 1:37 pm

Shell script

Post by xteriumsupport » Tue Apr 12, 2016 1:41 pm

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
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Shell script

Post by skurudo » Fri Apr 22, 2016 1:51 pm

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
Top


Locked
  • Print view

2 posts • Page 1 of 1

Return to “Scripting / API”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password