1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

create shim to buffer nodejs from returning non-zero (bson does not compile), and erroring out

This commit is contained in:
George Hunt 2018-05-22 01:11:15 +00:00
parent e0309cd5d4
commit c545df820a
2 changed files with 11 additions and 6 deletions

View file

@ -0,0 +1,5 @@
#!/bin/bash
# shim to daemonize node sugarizer.js, declare log target, return 0
cd /opt/iiab/sugarizer-server
nohup /bin/node sugarizer.js >> /var/log/sugarizer.log &
exit 0

View file

@ -3,16 +3,16 @@ Description=Node.js Sugarizer Server
# Requires=After=mongodb.service # Requires the mongodb service to run first
[Service]
WorkingDirectory={{ sugarizer_location }}/sugarizer/server/
ExecStart=/usr/bin/node sugarizer.js
WorkingDirectory={{ sugarizer_location }}/sugarizer-server/
ExecStart=start-sugarizer.sh
Restart=always
#RestartSec=10 # Restart service after 10 seconds if node service crashes
StandardOutput=syslog # Output to syslog
StandardError=syslog # Output to syslog
SyslogIdentifier=sugarizer
#StandardOutput=syslog # Output to syslog
#StandardError=syslog # Output to syslog
#SyslogIdentifier=sugarizer
#User=<alternate user>
#Group=<alternate group>
Environment=NODE_ENV=production
#Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target