how to check latest version?

B3rt

Verified User
Joined
Oct 12, 2007
Messages
81
Is there a way to check the latest DA version by script?

I am using the API to get the current version of DA, I am looking for a way to check the latest version by script without to having to look on the DA website.

Is there a simple way to retrieve this?
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
Just to be a little more specific

/usr/local/directadmin/custombuild/build versions
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
As i wrote: i need to check this by a (website) script, this means not by the DA server itself
And that is what we gave you. We gave a command line option that does not use directadmin itself.

I think you meant versions.php. Using this would require you to parse and extract from the html the version, not a very easy thing to do. Whereas the command line gives you a simple:

Code:
/usr/local/directadmin/custombuild/build versions | grep "Latest version of DirectAdmin"
Latest version of DirectAdmin: 1.36.2
This is a lot easier to use data from that than a web page.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Floyd, before doing this check don't you have to make sure that custombuild has the most current information?

Jeff
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
You may need to run ./build update_versions first.

I set up the cron job to do that already anyway so I don't have to think about it.
 

Arieh

Verified User
Joined
May 27, 2008
Messages
1,206
Location
The Netherlands
If you want to check the version with php, it is easier to fetch this url then to execute from command line to a path a website shouldn't have access to. Removing the javascript is also not that big a trouble.

PHP:
<?php

$version = file_get_contents('http://www.directadmin.com/version.php');
$version = str_replace("document.write('", '', $version);
$version = str_replace("');", '', $version);

print $version;

?>
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
If you want to check the version with php, it is easier to fetch this url then to execute from command line to a path a website shouldn't have access to.
Nobody said anything about doing it form a web site. The OP wanted to do it with a script without using DA on his server or accessing the DA web site, according to the original post.
 

Arieh

Verified User
Joined
May 27, 2008
Messages
1,206
Location
The Netherlands
Starting post was vague indeed, but he replied that he found 'it', giving the vesion.php url and saying "(website) script".
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
Yes without knowing exactly what he is trying to accomplish and how, its hard to give the best answer. Whoever comes across this thread now has 2 ways to choose from.
 

AJ77

New member
Joined
Sep 8, 2018
Messages
2
Directadmin emails show version

To find out which version of Direct Admin is running just look at the email notification after making a backup, in the bottom it says; Automated Message Generated by DirectAdmin 1.51.3
 
Top