Hey all, continuing the unending fun that is the Event Hooks plugin, here’s a script to notify clients when their SiteWorx account has just been created. As always, expand upon it as needed!
Thanks!
#!/bin/bash
#
# INSTALLATION:
#
# Install this script at /usr/local/bin/notify_sw_client.sh
#
# Enable the Event Hooks plugin in NodeWorx.
# Add the following line to your InterWorx Event Hook Configuration:
#
# Ctrl_Nodeworx_Siteworx add /usr/local/bin/notify_sw_client.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/notify_sw_client.sh
# chown iworx /usr/local/bin/notify_sw_client.sh
if [[ "$iw_master_domain" == "" ]]; then
exit 1
fi
mail -s 'Welcome to SiteWorx!' $iw_email -- -f admin@example.com<<EOF
Hello! Your SiteWorx account for $iw_master_domain has just been created.
To login, visit https://$iw_master_domain:2443/siteworx
E-mail: $iw_email
Password: $iw_password
EOF
exit 0