To enable custom actions at specific execution points, copy the example file from /opt/webinoly/lib/api-events_sample
and rename it to /opt/webinoly/lib/api-events
. Once renamed, Webinoly will automatically source this script and invoke it at each defined event.
A comprehensive list of event codes is provided for every Webinoly command, allowing you to pinpoint exactly when your code is executed.
For example, the “in2” event signifies the completion of Nginx installation. By handling this event, you can automate the installation of additional packages. Similarly, you may intercept any Webinoly command to integrate with external tools or run arbitrary scripts immediately before or after its execution.
* Note that these codes were changed and updated recently (v1.17.3)
# Example
# Install my own package after Nginx is installed!
if [[ $1 == "in2" ]]; then
sudo apt install -y my-own-package
fi
This content is restricted to GitHub Sponsors only.
Your sponsorship helps make content like this possible!
If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Community Forum.