cli: use nonzero exit to force restart

This commit is contained in:
Koushik Dutta
2024-03-19 13:09:34 -07:00
parent b7509fbd12
commit 706e37ea68
3 changed files with 6 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "scrypted",
"version": "1.3.12",
"version": "1.3.13",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "scrypted",
"version": "1.3.12",
"version": "1.3.13",
"license": "ISC",
"dependencies": {
"@scrypted/client": "^1.3.3",

View File

@@ -1,6 +1,6 @@
{
"name": "scrypted",
"version": "1.3.12",
"version": "1.3.13",
"description": "",
"main": "./dist/packages/cli/src/main.js",
"bin": {

View File

@@ -117,6 +117,7 @@ export async function serveMain(installVersion?: string) {
await installServe(installVersion, true);
}
// todo: remove at some point after core lxc updater rolls out.
if (process.env.SCRYPTED_INSTALL_ENVIRONMENT === 'lxc')
process.env.SCRYPTED_FFMPEG_PATH = '/usr/bin/ffmpeg';
@@ -134,7 +135,7 @@ export async function serveMain(installVersion?: string) {
if (fs.existsSync(EXIT_FILE)) {
console.log('Exiting.');
process.exit();
process.exit(1);
}
else if (fs.existsSync(UPDATE_FILE)) {
console.log('Update requested. Installing.');
@@ -142,7 +143,7 @@ export async function serveMain(installVersion?: string) {
console.error('Update failed', e);
});
console.log('Exiting.');
process.exit();
process.exit(1);
}
else {
console.log(`Service unexpectedly exited. Restarting momentarily.`);