@rubytech/create-maxy 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -280,6 +280,8 @@ function deployPayload() {
|
|
|
280
280
|
}
|
|
281
281
|
function buildPlatform() {
|
|
282
282
|
log("8", TOTAL, "Installing dependencies and building...");
|
|
283
|
+
// Stop the running service before rebuilding (upgrade path)
|
|
284
|
+
spawnSync("systemctl", ["--user", "stop", "maxy"], { stdio: "pipe" });
|
|
283
285
|
shell("npm", ["install", "--quiet"], { cwd: join(INSTALL_DIR, "platform") });
|
|
284
286
|
shell("npm", ["run", "build"], { cwd: join(INSTALL_DIR, "platform") });
|
|
285
287
|
shell("npm", ["install", "--quiet"], { cwd: join(INSTALL_DIR, "maxy") });
|
|
@@ -324,10 +326,10 @@ WantedBy=default.target
|
|
|
324
326
|
spawnSync("sudo", ["loginctl", "enable-linger", user], { stdio: "inherit" });
|
|
325
327
|
}
|
|
326
328
|
catch { /* not critical */ }
|
|
327
|
-
// Reload and start
|
|
329
|
+
// Reload and (re)start
|
|
328
330
|
spawnSync("systemctl", ["--user", "daemon-reload"], { stdio: "inherit" });
|
|
329
331
|
spawnSync("systemctl", ["--user", "enable", "maxy"], { stdio: "inherit" });
|
|
330
|
-
spawnSync("systemctl", ["--user", "
|
|
332
|
+
spawnSync("systemctl", ["--user", "restart", "maxy"], { stdio: "inherit" });
|
|
331
333
|
// Wait for the server to come up
|
|
332
334
|
console.log(" Waiting for web server...");
|
|
333
335
|
for (let i = 0; i < 20; i++) {
|