fluxy-bot 0.5.56 → 0.5.57
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/package.json +1 -1
- package/supervisor/index.ts +3 -2
package/package.json
CHANGED
package/supervisor/index.ts
CHANGED
|
@@ -673,14 +673,15 @@ export async function startSupervisor() {
|
|
|
673
673
|
// Run fluxy update in a separate systemd scope so it survives daemon stop/restart
|
|
674
674
|
function runDeferredUpdate() {
|
|
675
675
|
const cliPath = path.join(PKG_DIR, 'bin', 'cli.js');
|
|
676
|
+
const user = os.userInfo().username;
|
|
676
677
|
log.info('Deferred update triggered — running fluxy update via systemd-run...');
|
|
677
678
|
try {
|
|
678
679
|
const child = cpSpawn('sudo', [
|
|
679
680
|
'systemd-run', '--quiet',
|
|
680
681
|
'--unit=fluxy-update',
|
|
682
|
+
'--uid=' + user,
|
|
681
683
|
'--setenv=HOME=' + os.homedir(),
|
|
682
|
-
'--setenv=
|
|
683
|
-
'--setenv=FLUXY_REAL_HOME=' + os.homedir(),
|
|
684
|
+
'--setenv=PATH=' + process.env.PATH,
|
|
684
685
|
process.execPath, cliPath, 'update',
|
|
685
686
|
], { detached: true, stdio: 'ignore' });
|
|
686
687
|
child.unref();
|