I wrote the following script:
#! /bin/bash
source service supervisor stop
source service supervisor start
source service nginx restart
usechmod 755
After giving permission, I ran it. Returned:stopping supervisor...
Then change the script to:
#! /bin/bash
source service supervisor stop &&
source service supervisor start &&
source service nginx restart
Run again or return:
stopping supervisor...
Wait for me to use any of the following commands in the terminal:
source service supervisor start
source service supervisor status
The same is true of nginx’s commands. Before flashing back, you will be prompted:
basename invalid option -- 'b'
Try 'basename --help' for more information.
I don’t know much about Linux. After reading the tutorial, I wrote the script. This time, I know it’s wrong. Please give me some advice.
1 Answers
Try removing the source
Who told you to add source before the order
You’re right. Would you please explain?
In this tutorialWith this command, I copied it into the script.
Find the file called service and send the content
I didn’t find the service file, but this onearticleI talked about how to use Ubuntu service, and I want to send the files under / etc / init. D /?