• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Running script from Plesk Event 'Hosting settings created'

NikolasP

New Pleskian
Hello!

I'm trying to run a simple bash script when a new account is created, because I need to move some files automatically. So what I did:

  1. I have created a simple bash script for testing if Plesk run it, called move_some_files.sh under /var/www
    Code:
    #!/bin/bash
    
    echo "${NEW_SYSTEM_USER} ${NEW_DOMAIN_NAME}" >> move_some_files.log
    I created this file as root and did chmod +x.
  2. I created a new 'Hosting settings created' event running as root and with the highest priority with this command: /var/www/move_some_files.sh
  3. I created a new customer with to test it

    But, is not running the script! If I try some command directly on the event like 'touch /var/www/new_file' it's created, so the event is running, but not my script.

    Any idea?
 
Back
Top