Event Hooks Setup


Please find below the setup instructions for enabling Event Hooks and setup a simple event Hook to change SSL for siteworx accounts using SSL (please note all thanks to IW Team where this information has been taken from).

I hope I have made it simple to follow, and please feel free to correct if you find any mistakes.

Please look through the forum for more event hooks which you can use or adapt or if you make any event hooks for your use, it would be lovely if you could share with the forum if possible.

Many thanks


Event Hooks
(This plugin allows any custom server script to be executed after any successful interworx action. For example, you could have a script run that notifies you when a new SiteWorx account is created, or when a pointer domain gets deleted, etc. Any ‘input’ from the user that was involved in the action will be available to the shell script as environment variables, prefixed with ‘iw_’. See http://interworx.com/iworx-hooks.conf for a sample hooks configuration file. For even more control, custom plugins can also be written.)



Please download and save iworx-hooks.conf sample file (http://interworx.com/iworx-hooks.conf for a sample hooks configuration file) and save into /etc/iworx-hooks.conf

 chown iworx /etc/iworx-hooks.conf

First, ensure the InterWorx CLI is installed via ‘yum install interworx-cli’

Install this script at /usr/local/bin/custom_cipher_suite.sh (please see end for file code)

Enable the Event Hooks plugin in NodeWorx - nodeworx, plugins, Event Hooks, enable

Add the following line to your InterWorx Event Hook Configuration:

 Ctrl_Siteworx_Ssl install /usr/local/bin/custom_cipher_suite.sh

Ensure that both this file and the Event Hook config are both readable
and executable by the iworx user:

 chmod 0770 /usr/local/bin/custom_cipher_suite.sh
 chown iworx /usr/local/bin/custom_cipher_suite.sh

In order for this script to run successfully, the iworx user
must be added to the sudoers file. This can be done as follows:

Run ‘visudo’
Append these lines:

 %iworx ALL=(ALL) NOPASSWD:SETENV: /bin/bash -p /usr/local/bin/custom_cipher_suite.sh
 Defaults:%iworx !requiretty

Save and exit visudo

File Code

Save below as custom_cipher_suite.sh and Install this script at /usr/local/bin/custom_cipher_suite.sh

if [[ “$iw_working_domain” == “” ]]; then
exit 1

if [[ “$(id -u)” != “0” ]]; then
self="$( cd “$( dirname “${BASH_SOURCE[0]}” )” && pwd )/$(basename $0)"
sudo -E bash -p $self
exit 0



sed -i “s/SSLCipherSuite $oldcipher/SSLCipherSuite $newcipher/g” $file


This post is now redundant if using Interworx-CP 5.1 or higher.
The SSL ciphers are now set from Nodeworx, Server, SSL as shown in pictures here.
Many thanks

Hi, thanks bro