diff --git a/plugins/core/package-lock.json b/plugins/core/package-lock.json index 891891c10..4691886c6 100644 --- a/plugins/core/package-lock.json +++ b/plugins/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/core", - "version": "0.3.14", + "version": "0.3.15", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/core", - "version": "0.3.14", + "version": "0.3.15", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/core/package.json b/plugins/core/package.json index c4bc713c3..b9c34de96 100644 --- a/plugins/core/package.json +++ b/plugins/core/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/core", - "version": "0.3.14", + "version": "0.3.15", "description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/core/src/platform/lxc.ts b/plugins/core/src/platform/lxc.ts index 21f0fb9a0..a2ed9fb73 100644 --- a/plugins/core/src/platform/lxc.ts +++ b/plugins/core/src/platform/lxc.ts @@ -19,6 +19,14 @@ export async function checkLxcDependencies() { needRestart = true; } + if (!fs.existsSync('/var/run/avahi-daemon/socket')) { + const cp = child_process.spawn('sh', ['-c', 'apt install avahi-daemon']); + const [exitCode] = await once(cp, 'exit'); + if (exitCode !== 0) + sdk.log.a('Failed to install avahi-daemon.'); + else + needRestart = true; + } const scryptedService = fs.readFileSync('scrypted.service').toString(); const installedScryptedService = fs.readFileSync('/etc/systemd/system/scrypted.service').toString();