aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/utils.js b/src/utils.js
index 38aaf85..c06aca1 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -35,15 +35,19 @@ if (fs.existsSync("viper.json")) {
}
-// auto-updates
-{
+northstar_auto_updates: {
+ if (!settings.autoupdate) break northstar_auto_updates;
+
setInterval(async _ => {
const localVersion = getNSVersion();
const distantVersion = await requests.getLatestNsVersion();
+ console.log('Checking for Northstar updates...');
if (localVersion !== distantVersion) {
- console.log('Northstar update available');
+ console.log('Northstar update available! Launching update process.');
update();
+ } else {
+ console.log('No Northstar update available.')
}
},