Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Internal API or Events
- # Docs: https://malaya.com/en/api/internal-api-events/
- # Description: Execute actions at certain points or events, for example at the end of the "stack" command each time is executed
- # or after Nginx is installed. Just rename this file to "api-events" and check for the complete list of status codes in the documentation.
- # Just put all your code inside this function:
- api-events_catch_status() {
- echo "${blu}API Status: $1 ${end}"
- # webinoly -init
- if [[ -n $init ]]; then
- echo "Updating system..."
- sudo apt-get upgrade && sudo apt-get upgrade -y
- # site domain.com -badbots
- elif [[ -n $badbots ]]; then
- echo "Installing nginx badbots..."
- # Do various checkups and execute commands from:
- # https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
- # webinoly -fail2ban
- elif [[ -n $fail2ban ]]; then
- echo "Installing fail2ban"
- apt install -y -qq fail2ban
- # Execute other configuration steps
- fi
- exit 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement