Announcement

Collapse
No announcement yet.

Custom SiteWorx Client Mail

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom SiteWorx Client Mail

    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!

    Code:
    #!/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
    Matt Parmelee
    Interworx Developer
    http://www.interworx.com/

  • #2
    I will just do it all by myself..think i am getting what does that means..just forgot the two hashes and the equal sign.

    Comment


    • #3
      Hi dragonmiller

      Did you resolve your permissions issue stopping the hook from working.

      If not and you don't know how to, the easiest way is to ssh into the server and run the permission scripts but do not include the hash ie chown etc...

      Also, the above hook maybe for version 5 interworx and if your on version 4, you need to replace the following

      iw_master_domain with iw_domain

      Otherwise you will have an abort of the hook

      If you've resolved yourself, please ignore this.

      Many thanks

      John

      Comment

      Working...
      X