mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Rename work 🏗
This commit is contained in:
30
front/php/templates/migrationCheck.php
Executable file
30
front/php/templates/migrationCheck.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
|
||||
<script>
|
||||
|
||||
var migrationNeeded = <?php
|
||||
// Check if either file exists
|
||||
$configFile = '/home/pi/pialert/conf/pialert.conf';
|
||||
$databaseFile = '/home/pi/pialert/db/pialert.db';
|
||||
|
||||
if (file_exists($configFile) || file_exists($databaseFile)) {
|
||||
|
||||
echo 'true';
|
||||
|
||||
} else {echo 'false'; }
|
||||
?>
|
||||
|
||||
console.log(`migrationNeeded = ${migrationNeeded}`);
|
||||
|
||||
|
||||
if(migrationNeeded == true)
|
||||
{
|
||||
message = getString("TICKER_MIGRATE_TO_NETALERTX")
|
||||
|
||||
setTimeout(() => {
|
||||
showTickerAnnouncement(message)
|
||||
},100);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user