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:
parent
e0309cd5d4
commit
c545df820a
2 changed files with 11 additions and 6 deletions
5
roles/sugarizer/templates/start-sugarizer.sh
Executable file
5
roles/sugarizer/templates/start-sugarizer.sh
Executable 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
|
|
@ -3,16 +3,16 @@ Description=Node.js Sugarizer Server
|
||||||
# Requires=After=mongodb.service # Requires the mongodb service to run first
|
# Requires=After=mongodb.service # Requires the mongodb service to run first
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory={{ sugarizer_location }}/sugarizer/server/
|
WorkingDirectory={{ sugarizer_location }}/sugarizer-server/
|
||||||
ExecStart=/usr/bin/node sugarizer.js
|
ExecStart=start-sugarizer.sh
|
||||||
Restart=always
|
Restart=always
|
||||||
#RestartSec=10 # Restart service after 10 seconds if node service crashes
|
#RestartSec=10 # Restart service after 10 seconds if node service crashes
|
||||||
StandardOutput=syslog # Output to syslog
|
#StandardOutput=syslog # Output to syslog
|
||||||
StandardError=syslog # Output to syslog
|
#StandardError=syslog # Output to syslog
|
||||||
SyslogIdentifier=sugarizer
|
#SyslogIdentifier=sugarizer
|
||||||
#User=<alternate user>
|
#User=<alternate user>
|
||||||
#Group=<alternate group>
|
#Group=<alternate group>
|
||||||
Environment=NODE_ENV=production
|
#Environment=NODE_ENV=production
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue