Submitted by balzercomp on Wed, 04/21/2010 - 10:07
Hi,
is there a way to create a cron job when creating a new vHost? I didn't find a way to do it from the Server Templates.
Thanks
Gerald
Status:
Closed (fixed)
Hi,
is there a way to create a cron job when creating a new vHost? I didn't find a way to do it from the Server Templates.
Thanks
Gerald
Comments
Submitted by JamieCameron on Wed, 04/21/2010 - 12:47 Comment #1
Sorry, no .. at least not from templates.
The only method would be to use a post-creation script with code like :
#!/bin/sh
if [ "$VIRTUALSERVER_ACTION" = "CREATE_DOMAIN" ]; then
echo "$VIRTUALSERVER_USER 0 0 * * * /path/to/command" >/etc/cron.d/$VIRTUALSERVER_DOM
fi
This creates a cron job file that runs as the domain's user.
Submitted by balzercomp on Wed, 04/21/2010 - 15:02 Comment #2
Thanks,
I'll see into it.
Gerald
Submitted by Issues on Thu, 05/06/2010 - 11:22 Comment #3
Automatically closed -- issue fixed for 2 weeks with no activity.