From 6f4bf643fc1f0214e7bc86428fc6adfaf68ffaff Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Sun, 26 Jun 2022 14:24:06 +0100 Subject: [PATCH] add wants and after --- modules/service-manager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/service-manager.js b/modules/service-manager.js index 1a51b91..47e7707 100644 --- a/modules/service-manager.js +++ b/modules/service-manager.js @@ -2723,7 +2723,10 @@ function serviceManager() { throw ('unknown location for systemd configuration files'); } - conf.write('[Unit]\nDescription=' + serviceDescription + '\n'); + conf.write('[Unit]\n'); + conf.write('Description=' + serviceDescription + '\n'); + conf.write('Wants=network-online.target\n'); + conf.write('After=network-online.target\n'); conf.write('[Service]\n'); conf.write('WorkingDirectory=' + options.installPath + '\n'); conf.write('ExecStart=' + options.installPath.split(' ').join('\\x20') + options.target.split(' ').join('\\x20') + ' ' + parameters + '\n');