Version 1.46.1

Released: 2014-09-24

reseller_destroy_pre.sh new

New custom script:

/usr/local/directadmin/scripts/custom/reseller_destroy_pre.sh

Very similar to user_destroy_pre.sh, except it's run before you delete a Reseller.

The reason for having this script is that if you delete a Reseller, adding the reseller and users to the user_destroy_pre.sh won't be suffiicent, in that a lot of deletion cleanup is done prior to the Reseller's user portion actually being removed (which is when the user_destroy_pre.sh is finally run).. so the user_destroy_pre.sh isn't sufficient to cover some cases.

This script will be handy if you want to prevent the deletion of an account, or account (Reseller or User) below it.

Options passed to this script are exactly the same as the user_destroy_pre.sh (the contents of user.conf from that Reseller), so these scripts should might often go in tandem:

ln -s user_destroy_pre.sh reseller_destroy_pre.sh

More Apache/Nginx custom template tokens (SKINS) new

In addition to the |CUSTOM| token for the virtual_host2*.conf and nginx_server*.conf templates, DA now also supports

|CUSTOM1|

|CUSTOM2|

|CUSTOM3|

|CUSTOM4|

added to various places in the templates, so you'd likely no longer need to make custom template copies to use the custom httpd configuration options, if you needed them in the past.

New files will be:

/usr/local/directadmin/data/users/username/domains/

domain.com.cust_httpd.1
domain.com.cust_httpd.2
domain.com.cust_httpd.3
domain.com.cust_httpd.4

domain.com.cust_nginx.1
domain.com.cust_nginx.2
domain.com.cust_nginx.3
domain.com.cust_nginx.4
SKINS:

admin/custom_httpd_domain.html

added:

<textarea name=custom1>|CUSTOM1|</textarea>
<textarea name=custom2>|CUSTOM2|</textarea>
<textarea name=custom3>|CUSTOM3|</textarea>
<textarea name=custom4>|CUSTOM4|</textarea>

See the enhanced skin for javascript toggling of the customX tr display.


files_user.conf

JS_VISIBILITY=visibility.js

plus the new visibility.js for hide/show toggle code.


style.css

.expand_toggle_neg
{
    padding-left: 5px;
    padding-right: 5px;
}
.expand_toggle_plus
{
    padding-left: 3px;
    padding-right: 3px;
}
.expand_toggle_neg:active, .expand_toggle_plus:active
{
    background: #666e8a;
    border: 1px inset #c5cff1;
    box-shadow: none;
}
.expand_toggle_neg, .expand_toggle_plus
{
    background: #98a5d2;
    color: white;
    margin-right: 10px;
    #padding: 1px;
    border-radius: 3px;
    border: 1px outset #c5cff1;
    box-shadow: 1px 1px 3px #969696;

cursor:pointer;
}

Only show the last X bytes of the brute_log_entries.list (SKINS) new

In some cases, the brute_log_entries.list can get very large (part of the Brute Force Monitor / BFM).

If this happens, depending how large, the display of the BFM can be slow and possibly timeout.

New variable, defaulting to:

-500000

is set such that DA will only show the last -50000 bytes from the end of the brute_log_entries.list (starting after scrolling forward to the next \ character)

If you wish to see more, at the bottom of the Log Entry table, there should be a textfield that allows you to see any negative value (in bytes) or 0 (for all entries).

SKINS:

admin/brute_force_monitor.html

added:

<script language="Javascript">
<!--
function validate_seek()
{
    var val = document.getElementById('seek_value').value;
    if (isNaN(val) || val > 0)
    {
        return false;
    }
    return true;
}
//-->
</script>
<form onsubmit="return validate_seek();">
<input type=hidden name="sort1" value="-1">

brute_log_entries.list is |BRUTE_LOG_SIZE|. &nbsp;&nbsp;

Only show <input size=6 type=text placeholder="0 or negative number" title="" id="seek_value" name="seek_value" value="|*if seek_value||seek_value||*else|0|*endif|" onchange="if (!validate_seek()) { this.value=0; } else { location.href='CMD_BRUTE_FORCE_MONITOR?sort1=-1&seek_value='+this.value; }"> bytes from the end of the file (negative number). 0 for all.</form>

admin/content_main.html

changed the link to be:

<a href="CMD_BRUTE_FORCE_MONITOR?sort1=-1&seek_value=-500000">Brute Force Monitor</a><br>

adding the seek_value.

domains and domainowners to be set to 640 in the set_permissions.sh fixed

Related to this change:

Reduce permissions on system files (SECURITY)

The set_permissions.sh had 600 set for domains and domainowners which would cause an error.

The 2 files should be chmod to 640.

MySQL optimize/check/repair options did nothing fixed

Coding error causing the MySQL database features:

Optimize, Repair, Check

do nothing and returned:

Results

Details

without any information.

http://forum.directadmin.com/showthread.php?t=49850&p=257119#post257119

Error restoring reseller\'s package packagenme: nsubdomains=unlimited is not a number fixed

Caused by this change:

Give warning if package inode set between 1-200

the same code is used to set the package values during a restore, as when set through DA itself.

The html forms use checkboxes to specify the unlimited value, but a package restore uses the actual variable names.. which differs from the forms.

Adjusted code to allow setting unlimited in the variables or the checkboxes.

Hide SSL/CGI/PHP checkboxes for domain, if User is not allowed to use them (SKINS) fixed

Related thread:

http://forum.directadmin.com/showthread.php?t=49928

User Level -> Domain Setup -> domain.com

If either of:

CGI

PHP

SSL

is not allowed for a given User, hide those rows.

No new tokens were needed, only skin changes.

SKINS:

user/modify_domain.html

user/add_domain.html (DA 1.46.3)

|*if USERSSL="ON"|

|*if USERCGI="ON"|

|*if USERPHP="ON"|

plus |*endif| for each, around the <tr> for that given item.

Also removed the "Ignored if not allowed" text, as if not allowed, they will no longer see the row at all anyway.

Last Updated: