This script is designed to create a supervisor config file and a Gost config file for a bash script. Supervisor is a process control system that allows you to monitor and control a number of processes on UNIX-like operating systems. Gost is a simple command-line tunneling service that can be used to forward traffic over a secure SSH connection.
-
Make sure you have supervisor and gost installed on your system.
-
Copy the code into a text editor and save it with a .sh extension.
-
Open a terminal and navigate to the directory where the script is saved.
-
Run the script using the following command:
bash scriptname.sh
-
Follow the prompts to enter the necessary information, such as the name of the config file, the name of the program, the server-side port, and the public key path.
-
The script will create the supervisor config file and the Gost config file, make the bash script executable, and restart supervisor to apply the changes.
- Prompts the user to enter the name of the supervisor config file and the program name.
- Creates a supervisor config file in the /etc/supervisor/conf.d/ directory with the specified name and program name.
- Prompts the user to enter the server-side port and the public key path.
- Creates a Gost config file in the /root/ directory with the specified name and program name.
- Makes the Gost config file executable.
- Restarts supervisor to apply the changes.
This script requires root privileges to create and modify files in the /etc/supervisor/conf.d/ and /root/ directories. Make sure you run the script as a user with sufficient privileges. Additionally, be sure to configure Gost and supervisor to meet your specific needs.