core: update lxc with avahi support

This commit is contained in:
Koushik Dutta
2024-03-21 22:22:38 -07:00
parent e9eecd145e
commit 8dbf751cd9
4 changed files with 8 additions and 5 deletions

View File

@@ -10,6 +10,9 @@ ExecStart=/usr/bin/npx -y scrypted serve
Restart=on-failure
RestartSec=3
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Environment="SCRYPTED_PYTHON_PATH=/usr/bin/python3"
Environment="SCRYPTED_PYTHON39_PATH=/usr/bin/python3.9"
Environment="SCRYPTED_PYTHON310_PATH=/usr/bin/python3.10"
Environment="SCRYPTED_FFMPEG_PATH=/usr/bin/ffmpeg"
Environment="SCRYPTED_INSTALL_ENVIRONMENT=lxc"

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/core",
"version": "0.3.15",
"version": "0.3.16",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/core",
"version": "0.3.15",
"version": "0.3.16",
"license": "Apache-2.0",
"dependencies": {
"@scrypted/common": "file:../../common",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.3.15",
"version": "0.3.16",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",

View File

@@ -20,7 +20,7 @@ export async function checkLxcDependencies() {
}
if (!fs.existsSync('/var/run/avahi-daemon/socket')) {
const cp = child_process.spawn('sh', ['-c', 'apt install avahi-daemon']);
const cp = child_process.spawn('sh', ['-c', 'apt update && apt install avahi-daemon && apt upgrade']);
const [exitCode] = await once(cp, 'exit');
if (exitCode !== 0)
sdk.log.a('Failed to install avahi-daemon.');
@@ -28,7 +28,7 @@ export async function checkLxcDependencies() {
needRestart = true;
}
const scryptedService = fs.readFileSync('scrypted.service').toString();
const scryptedService = fs.readFileSync('lxc/scrypted.service').toString();
const installedScryptedService = fs.readFileSync('/etc/systemd/system/scrypted.service').toString();
if (installedScryptedService !== scryptedService) {