Useful Scripts
Cronjob
- Error Log Detection: Set up a cronjob to monitor the error.log file for occurrences of “error” and receive email notifications.
Bash Scripts
- Monitor Server Ports and Alert: Continuously monitors server ports. Sends email notifications if any new listening ports are detected.
- Prompt Folder Path and Download Package: Prompts for a folder path. Indicates folder existence and creates the folder if it doesn’t exist. Downloads and installs a package in the newly created folder.
- Restart Server: Shell script to monitor a process (e.g., Tomcat) every minute. If the process stops, it should restart; otherwise, it exits.
- Docker Restart: Shell script to monitor Docker containers. If the containers exit, they should restart automatically.