Internal API and Events

We can execute actions in certain points or events. Check the example file located in /opt/webinoly/lib/api-events_sample, you just have to rename the file to api-events to start running.

For example, at the end of the Nginx installation event, we could install some additional tool, or when a Webinoly command is executed, we can communicate with an external tool or execute any code we want.

* 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

HttpAuth

  • has – Start command execution
  • hae – End command execution
  • ha1 – Before add user
  • ha2 – Before delete user
  • ha3 – Before wp-admin command
  • ha4 – Before whitelist command

Log

  • lgs – Start command execution
  • lge – End command execution
  • lg1 – Before enable only-error (global)
  • lg2 – Before disable only-error (global)
  • lg3 – Before enable only-error (domain)
  • lg4 – Before disable only-error (domain)

Site

  • sis – Start command execution
  • sie – End command execution
  • si1 – Before create a site
  • si2 – Before WP installation
  • si3 – Before WP cache plugins installation
  • si4 – Before enable site
  • si5 – Before disable site
  • si6 – Before delete site
  • si7 – Before delete all sites
  • si8 – Before enable cache
  • si9 – Before disable cache
  • si10 – Before enable SSL
  • si11 – Before disable SSL

Stack

  • sts – Start command execution
  • ste – End command execution
  • st1 – Before stack LEMP
  • st2 – Before Purge Server All
  • st3 – Before php-ver
  • st4 – Before mysql-ver

Installation process

  • ics – Common Packages
  • ic1 – Ubuntu Optimization
  • ic2 – Kernel Optimization
  • ic3 – Kernel Optimization Finished
  • ic4 – SWAP Creation
  • ic5 – SWAP Creation Finished
  • ic6 – Ubuntu Optimization Finished
  • ice – Common Packages Finished
  • iks – PPA (Repo) GPG Keys Start
  • ikn – Nginx Key
  • ikp – PHP Key
  • ikr – Redis Key
  • ikm – MySQL/MariaDB Key
  • ike – PPA GPG Keys Finished
  • in1 – NGINX Installation
  • in2 – NGINX Installation Finished
  • in3 – NGINX Optimization
  • in4 – NGINX Optimization Finished
  • in5 – Let’s Encrypt
  • in6 – Let’s Encrypt Finished
  • in7 – Backup packages
  • in8 – Backup packages Finished
  • ip1 – PHP Installation
  • ip2 – PHP Installation Finished
  • ip3 – PHP Optimization
  • ip4 – PHP Optimization Finished
  • ip5 – Postfix
  • ip6 – Postfix Finished
  • ip7 – Redis
  • ip8 – Redis Finished
  • ip9 – Memcached
  • ip10 – Memcached Finished
  • im1 – MySQL Client Installation
  • im2 – MySQL Client Installation Finished
  • im3 – MySQL Installation
  • im4 – MySQL Installation Finished
  • im5 – MySQL Optimization
  • im6 – MySQL Optimization Finished
  • im7 – MySQL Tool (phpMyAdmin)
  • im8 – MySQL Tool (phpMyAdmin) Finished

Purge (UnInstall)

  • pn1 – NGINX Purge
  • pn2 – NGINX Delete All Sites
  • pn3 – Let’s Encrypt Purge
  • pn4 – Let’s Encrypt Purge Finished
  • pn5 – Backup packages Purge
  • pn6 – Backup packages Purge Finished
  • pn7 – Ubuntu Optimization Purge
  • pn8 – Ubuntu Optimization Purge Finished
  • pn9 – SWAP Purge
  • pn10 – SWAP Purge Finished
  • pp1 – PHP Purge
  • pp2 – Postfix
  • pp3 – Postfix Finished
  • pp4 – Redis
  • pp5 – Redis Finished
  • pp6 – Memcached
  • pp7 – Memcached Finished
  • pp8 – PHP Purge Finished
  • pm1 – MySQL Purge
  • pm2 – MySQL Tool (phpMyAdmin) Purge
  • pm3 – MySQL Tool (phpMyAdmin) Purge Finished
  • pm4 – MySQL Purge Finished

Webinoly

  • wys – Start command execution
  • wye – End command execution
  • wy1 – Before update Webinoly
  • wysus – Stack update Start
  • wysue – Stack update End
  • wy1s – After successfull Webinoly update.
  • wy2 – Before server reset
  • wy3 – Before clear cache
  • wy4 – Before uninstall Webinoly

If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Community Forum.