DietPi version information Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
cpcnw
Posts: 24
Joined: Wed Jun 29, 2016 8:31 am

Re: DietPi version information

Post by cpcnw »

Looks like the number of updated packages available that apt finds is written out to;

Code: Select all

/run/dietpi/.apt_updates
Very useful :)
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi version information

Post by Joulinar »

yes the sym linc is still in place on older images to ensure compatibility to the new DietPi script code. On newer images, it did not exist at all. Therefore it's recommended to use /boot/dietpi
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
cpcnw
Posts: 24
Joined: Wed Jun 29, 2016 8:31 am

Re: DietPi version information

Post by cpcnw »

Thanks :)

What is the best / most reliable way to check for a new version being released?
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi version information

Post by Joulinar »

You could try to read following files

Code: Select all

/run/dietpi/.update_available
/run/dietpi/.apt_updates
If they are not present, no update or apt package update are available 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
cpcnw
Posts: 24
Joined: Wed Jun 29, 2016 8:31 am

Re: DietPi version information

Post by cpcnw »

Works great thanks!

Code: Select all

function GetAptUpdates(){
                        $aptud=exec("cat /run/dietpi/.apt_updates");
                        if(empty($aptud)){echo '0';}
                        else{echo $aptud;}}

In html

Code: Select all

There are <?php GetAptUpdates();?> updated packages available
Post Reply