newcustom script for renaming domain
pre/post script for /CMD_CHANGE_DOMAIN
domain newdomain username bandwidth cgi defaultdomain ip php safemode ssl suspended
newcustom script for saving a dns zone
A : list of a records CNAME : list of cname records MX : list of mx records NS : list of ns records PTR : list of ptr records SERIAL : the serial used in the zone EMAIL : authoritative email NS1 : authoritative ns zone. DOMAIN : domain name of the zone SERVER_IP : server IP A_TIME : ttl for A records CNAME_TIME : ttl for CNAME records NS_TIME : ttl for NS records PTR_TIME : ttl for PTR records
Newer versions DirectAdmin may include (depending on dns_*= settings in directadmin.conf)
TXT, TIME_TIME, AAAA, AAAA_TIME, SRV, SRV_TIME, SPF, SPF_TIME, TLSA, TLSA_TIME, CAA, CAA_TIME, DS, DS_TIME, MX_FULL, MX_TIME.
You should use MX_FULL and not MX, as MX does not include the "left side" value.
See this entry for MX_FULL examples:
Subdomain MX records (SKINS) (API)
A, CNAME, MX, NS and PTR will be url encoded arrays:
a non zero return value from the script will output and text from stdout to the interface.
In cases where writing the dns is only a part of the whole action (eg: creating a User or new domain), aborting the script with a non-zero could prevent further actions from happening.
newTokenize hook files for plugins
Can now run php scripts (as the user) and also make use of all tokenizer functions, including If-Then-Else in skins and all templates
tokens that are passed are:
DOCUMENT_ROOT LANGUAGE USERNAME USER HOME SSL SESSION_KEY SESSION_ID HTTP_COOKIE HTTP_HOST SERVER_NAME REMOTE_ADDR SERVER_SOFTWARE SERVER_ADDR SERVER_PORT REQUEST_METHOD()); REDIRECT_STATUS=CGI QUERY_STRING REQUEST_URI POST SCRIPT_NAME
|$/usr/local/bin/php <? echo "Hello, my name is |USERNAME|"; ?> DONE|
newIncremental ftp backups
Instead of creating all the backups then transferring them, this will create each backup, then upload it, then delete it, one at at time. This will save on the disk space used. (User Backups).
If you don't want to use the incremental ftp backups (the old way), then add:
to your directadmin.conf and restart DA.
newAdd a confirmation tool to the task.queue for Includes in the httpd.conf
Since the main httpd.conf file is shared by everyone for the "Include" lines, if 2 people try to access the file at the same time, only one will get the file lock. The other process will wait, but only for so long. If the time lapses, the 2nd process will give up and the Include won't be added.
This tool will add a "confirm include is the httpd.conf" item to the task.queue file to be checked 1 minute after the include has been added. If it can't find it one minute later, then add it again.
Also added a "confirm removal" for the same files.
newadded token for the users email address from the user.conf
added token for the users email address from the user.conf
fixedChange sysbk to create a file for each user. (SKINS)
Change sysbk to create a backup file for each user intead of creating one large home.tar.gz file. This will also prevent /home/backup from being included in the backups, which can generate very large backup files.
A checkbox will be added to the settings to add all users to the custom directories file. When save is pressed, they'll all be added. When save is pressed without the checkbox they'll all be removed. /home will be removed either way when save is pressed.
Users will be added/removed from the custom directories backup as they are added/removed from the system (assuming the checkbox is set for adding).
set the mountpoint code to be:
on partition |MOUNT_POINT|
DA will add a list box for the partitions.
<tr> <td class=list><input type=checkbox name="ADD_USERS_TO_LIST" value="yes" |ADD_USERS_TO_LIST|> |LANG_ADD_USERS|</td> <td class=list> </td> </tr>
LANG_ADD_USERS=Add user home directories to directory list below
fixedsetup logrotate script FreeBSD
will be placed in /etc/newsyslogd.conf
fixedadd HTML-Parser if it doesn't exist
install HTML-Parser in the spam.sh if it doesnt exist so spamd will start.
fixedDatabase restore can't read the gz file
When a user restores a db.gz file, it's uploaded to the tmp directory, then the gunzip/mysql programs are run on it. The problem was the uploaded file was owned by "nobody" and there were not sufficient permissions on the file for the user to read the file to restore it. This fix chmods the file to 755 before executing the gunzip/mysql commands.
As a workaround (if you have ssh access), you can save the file to your home directory, cd to your home directory, then run:
gunzip < dbfile.gz | mysql -uusername -ppassword dbname
fixedWarning: ftp_put(): PORT command successful in - on line 31
Changed the php ftp script to use pasv mode instead.
If you need the fix now, add:
after the "ftp_login" command in the /usr/local/directadmin/scripts/ftp_upload.php file.
fixedEnable ~username on all IPs
Currently ~username is only enabled on the server IP. This will enable it on all shared IP's (that are not owned by a user).
fixedFtp accounts gone when another domain is added to owned IP account
All Ftp accounts disappear from /usr/local/directadmin/data/users/username/ftp.passwd when a 2nd domain is added to an owned IP account.
fixedFilemanager downloaded filesize
Related to: http://directadmin.com/forum/showthread.php?postid=35086#post35086
Change how the filesize are counted.
Because the filamanger is jailed, access to the byte logs it no longer available so the filesize is coutned before being downloaded. That causes a problem if the whole file isn't downloaded, as the entire size will be counted against the account.
The fix will
open a file descriptor
jail the DA process to the users home dir as usual
send the file
take the actual number of bytes sent and write it to the previously opened file descriptor which should be writing to the correct bytes log outside of the jail.