https://help.nursingsavvywriters.com/wp-content/uploads/2020/10/output-onlinepngtools-12-1-300x53.png 0 0 admin https://help.nursingsavvywriters.com/wp-content/uploads/2020/10/output-onlinepngtools-12-1-300x53.png admin2020-10-04 09:16:362020-10-04 09:16:36Shell Programming
You have created the directory structure and some base files to be used by the Web server and Web site. For the Web site to be created in a production environment, you need to package your commands in a script so that the patching team can run them on the production environment. Your task for this assignment is the following:
Create a Bourne shell script. The script should do the following:
- Explain what the script will do and who is the author in a comment area.
- cd to your home directory
- Show your current working directory.
- List the contents of the current directory.
- Create the directory structure and create the files as defined in the previous Individual Project.
- For each directory and file, test to see if the file or directory already exists; if it does exist, do not recreate; if it is missing, create it.
- In the end, generate a directory listing showing the structure and content of the new directories.
- At the beginning of the script, set a variable called INSTALL_DIRECTORY that will contain the location of the directory into which the Web server will be installed. At the end of the script, display the contents of this variable along with a message to the installer about the location in which the directories were created.
A small hint for creating the content of the httpd.conf file: use the echo command in your script. The script is not interactive and should create all objects automatically. Also, the ServerRoot and DocumentRoot should contain correct values based on your directory names.