postwwwacct scripts Here you will find postwwwacct scripts for various purposes. When a new account is created in WHM, the account is created by the script /scripts/wwwacct. When this script has completed it's job it checks for the existence of a postwwwacct file in the scripts directory. If that file exists, it is called and most of the account data is passed to it. That's where you can do various custom tasks upon account creation by using a postwwwacct script to do what you want done. I currently have 3 different postwwwacct scripts, one to provide temporary /~username access to new accounts which automatically gets removed a specified number of days later, one to send an automatic email out to the client when the account is created, and one to do some automatic editing of the new accounts files by using variables in the cpanel3-skel template files. If you are already using a postwwwacct script and want to use one of mine, just rename the other one postwwwacct2. Mine check for the existence of a postwwwacct2 script. If it exists, the original variables are passed to it and it is called to do it's job after my script is finished. If it's 2 of my scripts you want to use, it gets a bit trickier. You still rename one of them, whichever one you prefer to run second, but then you also need to make a minor change to the script you call postwwwacct2. If you have, or want to use more than 1 of my postwwwacct scripts, or want to know how multiples work, read about it at the bottom of this page. If you need help with installing a postwwwacct script, we can help for free if you are a member of our Scripts Club, or for $10 if you are not. That would automatically add you to our club. If you need us to do this for you on more than 2 servers, we may need to charge a little extra. Email us at customscripts@premierwebsitesolutions.com. You can scroll down the page or use these links to go to the one you want.
- give temporary /~username access be sure to upload scripts in ascii mode postwwwacct script - to give temporary /~username access
Script to give new users temporary access with /~username: PWSpostwwwacct1 V1.3
This script allows you to give new accounts temporary /~username access so they can view their site while waiting for their domains nameserver changes to propagate. Setting up this script is a bit complicated because it requires a line of data added to the httpd.conf file, like this:
If you feel uncomfortable modifying your httpd.conf file, we can install the script and modify the file(s) for you for free if you are a member of our scripts club. (on 1 or 2 servers)
Save the following file to your servers scripts directory, which should be at /scripts. postwwwacct script - rename to postwwwacct (no extension)
Read the instructions at the beginning of the script to see what modifications need to be done to your httpd.conf file. That file is usually at /usr/local/apache/conf/httpd.conf. Once the httpd.conf file is ready for the script, and the script is uploaded to your /scripts directory and made executable, you will be ready to go. Every time a new account is created, that user is added to the UserDir enabled line and the current users on that line are checked for expiry and removed if it's time. postwwwacct script - to send automatic emailRequires cPanel V11 or later.
Script to send automatic email upon account creation: PWSpostwwwacct2 V2.5 This script will automatically send a welcome email message to the email address provided when an account is created. It includes various bits of account information and the message is easily edited right in the script. If no email is specified in WHM when an account is created, the welcome message is sent to username@domain.com.
Save the following file to your servers scripts directory, which should be at /scripts. postwwwacct script - rename to postwwwacct (no extension) Read the instructions at the beginning of the script to set some variables and modify your welcome message. Once the script is uploaded to your /scripts directory and made executable, you will be ready to go. Every time a new account is created, that user is automatically emailed with account details. You also have the option to send a copy to yourself. postwwwacct script - to modify skeleton files upon account creationRequires cPanel V11 or later.
Script to modify skeleton files upon account creation: PWSpostwwwacct3 V3.0 This script allows you to put placeholders in your cpanel3-skel directory files which will automatically be replaced with appropriate account information when an account is created.
Save the following file to your servers scripts directory, which should be at /scripts. postwwwacct script - rename to postwwwacct (no extension)
older postwwwacct version - rename to postwwwacct (no extension) Once the script is uploaded to your /scripts directory and made executable, you just add placeholders to your skeleton files, and you will be ready to go. Every time a new account is created, the placeholders will automatically be replaced with the variables provided by the wwwacct (account creation) script. Instructions are at the beginning of the script.
Scripts Club |