Monitor Process and Restart
Write a shell script that monitors a given process name and restarts it if it stops running. Log restart times.
Constraints
- Arg: process name.
- Loop forever.
- pgrep detect.
- restart on fail.
- append log.
1#!/bin/bash2# TODO
Write a shell script that monitors a given process name and restarts it if it stops running. Log restart times.
1#!/bin/bash2# TODO