UNPKG

910 BSource Map (JSON)View Raw
1{"version":3,"sources":["../../../src/cli/install/createSystemdService.js"],"names":["clientDirectory","pkg","name","description","process","argv","trim"],"mappings":";;;;;;AAAA;;kBAEe,CAACA,eAAD,EAAkBC,GAAlB,KAA0B;AACvC,yBACG,uBAAsBA,IAAIC,IAAK,UADlC,EAEG;;gBAEWD,IAAIE,WAAY;;;;qBAIXH,eAAgB;cACvBI,QAAQC,IAAR,CAAa,CAAb,CAAgB;;;qBAGTJ,IAAIC,IAAK;;;GAV1B,CAaAI,IAbA,EAFF;AAiBD,C","file":"createSystemdService.js","sourcesContent":["import { writeFileSync } from 'fs';\n\nexport default (clientDirectory, pkg) => {\n writeFileSync(\n `/etc/systemd/system/${pkg.name}.service`,\n `\n [Unit]\n Description=${pkg.description}\n After=network.target\n [Service]\n Type=simple\n WorkingDirectory=${clientDirectory}\n ExecStart=${process.argv[0]} .\n Restart=always\n Environment=NODE_ENV=production\n SyslogIdentifier=${pkg.name}\n [Install]\n WantedBy=multi-user.target\n `.trim(),\n );\n};\n"]}
\No newline at end of file