Skip to content

Commit

Permalink
Update also symlink for mqtt.php for DietPi
Browse files Browse the repository at this point in the history
  • Loading branch information
mschlenstedt committed Apr 16, 2023
1 parent ad914c6 commit 6849f94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sbin/loxberryupdate/update_v3.0.0.4.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@
execute( command => "mv $lbhomedir/webfrontend/html/mqtt $lbhomedir/webfrontend/html/system/tools/mqtt", log => $log, ignoreerrors => 1 );
execute( command => "chown -R loxberry:loxberry $lbhomedir/webfrontend/html/system/tools/mqtt", log => $log, ignoreerrors => 1 );
}

# Symlinks for compatibility
unlink ("$lbhomedir/webfrontend/html/plugins/mqttgateway/receive.php");
unlink ("$lbhomedir/webfrontend/html/plugins/mqttgateway/receive_pub.php");
unlink ("$lbhomedir/webfrontend/htmlauth/plugins/mqttgateway/mqtt.php");
execute( command => "ln -f -s $lbhomedir/webfrontend/html/system/tools/mqtt/receive.php $lbhomedir/webfrontend/html/plugins/mqttgateway/receive.php", log => $log, ignoreerorrs => 1 );
execute( command => "ln -f -s $lbhomedir/webfrontend/html/system/tools/mqtt/receive_pub.php $lbhomedir/webfrontend/html/plugins/mqttgateway/receive_pub.php", log => $log, ignoreerorrs => 1 );
execute( command => "ln -f -s $lbhomedir/webfrontend/htmlauth/system/tools/mqtt.php $lbhomedir/webfrontend/htmlauth/plugins/mqttgateway/mqtt.php", log => $log, ignoreerorrs => 1 );

# Reset permissions
execute( command => "chown -R loxberry:loxberry $lbhomedir/webfrontend/htmlauth/plugins/mqttgateway", log => $log, ignoreerrors => 1 );
execute( command => "chown -R loxberry:loxberry $lbhomedir/webfrontend/html/plugins/mqttgateway", log => $log, ignoreerrors => 1 );
execute( command => "chown -R loxberry:loxberry $lbhomedir/webfrontend/html/system/tools/mqtt", log => $log, ignoreerrors => 1 );
Expand Down

0 comments on commit 6849f94

Please sign in to comment.