Write a script called wpinstall that will be invoked as follows:
wpinstall subdomain.mydomain --type=all
Where mydomain is any domain to which you have rights. The
subdomain. can be omitted, but if present is any valid subdomain name.
There type argument can be one of three values:
- siteonly: The script should install the site but should not
obtain an SSL certificate.
- certonly: The script should obtain an SSL certificate and
cause http web traffic to redirect to https.
- all: The script should do both actions (install the site and
obtain a certificate).
If the type argument is omitted then a value of all should be
assumed. Your script should do some basic checking of parameters and exit
with appropriate error messages if the parameters are absent of malformed.
The script should behave as follows:
- When invoked it should not require additional input from the user.
- The installed site should be accessible from any browser by entering
the subdomain.mydomain in the URL bar. This means you'll need to
update DNS entries from the script as well as create appropriate apache
config files.
- Do not assume that mydomain is already created as a hosted zone
in AWS. (It might be and it might not be). If not, then create the
hosted zone.
- The web space should be structured with a wordpress directory,
a logs directory, and a wp-config.php file. Directory
permissions should be set according to the instructions in the previous
assignment.
- Each separate invocation of this script should create a new database
and database user with a unique password.
- The wp-config.php file should be updated according to the
instructions of the previous assignment.
When you are finished upload your script as a .txt file into Canvas. Also,
leave a comment with the assignment telling me where on your system the script
is installed.