In this assignment, you are required to write a bash script, call it mycontainer.sh to do the following tasks: 1) Create an LXD container based on ubuntu. 2) Install the latest version of mysql on the container created in Step 1. Then, start the database and autostart it during future boots. 3) Print the process ID of the running database, then give this process the highest possible priority. 4 Inside the container, create a new systemd service to:     Re-execute Step 3 to adjust the priority.     Send a notification message to your AUIS email address(es).     Call this new service ‘email-mysql.service’. 5) Adjust systemd to run the ‘email-mysql.service’ automatically once every six hours. 6) Lastly, include necessary Bash commands to upload your container to an ssh server with the IP address 192.168.1.1. Assume the username and password are 'auis' and 'pass123', res

LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
5th Edition
ISBN:9781337569798
Author:ECKERT
Publisher:ECKERT
Chapter7: Working With The Bash Shell
Section: Chapter Questions
Problem 5DE
icon
Related questions
Question

In this assignment, you are required to write a bash script, call it mycontainer.sh to do the following tasks:

1) Create an LXD container based on ubuntu.

2) Install the latest version of mysql on the container created in Step 1. Then, start the database and autostart it during future boots.

3) Print the process ID of the running database, then give this process the highest possible priority.

4 Inside the container, create a new systemd service to:
    Re-execute Step 3 to adjust the priority.
    Send a notification message to your AUIS email address(es).
    Call this new service ‘email-mysql.service’.

5) Adjust systemd to run the ‘email-mysql.service’ automatically once every six hours.

6) Lastly, include necessary Bash commands to upload your container to an ssh server with the IP address 192.168.1.1. Assume the username and password are 'auis' and 'pass123', respectively.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L