How do I write a bash script to restart a server?

Ánh Dương

New member
How do I write a bash script to restart a server?
Answer
How To Use a Bash Script To Restart Linux Server Services
  1. sudo nano /opt/launch-crashed-services.sh. …
  2. The script uses the service <name> status command to output the status of a particular service such as mysql. …
  3. Save the file to /opt/launch-crashed-services.sh. …
  4. sudo chmod +x /opt/launch-crashed-services.sh. …
  5. sudo crontab -e.
 

Tìm kiếm

Back
Top