You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.You may add an script to start app with server start. save it in {MT-NOTES-DIR}/conf/autoload.sh:
#!/bin/bash
if [ $(ps -e -o uid,cmd | grep $UID | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ]
then
# Change Path With Yours.
# the third line show how to start app with pm2.
export PATH=$PATH:/home/mt/.nvm/versions/node/v0.12.4
export NODE_PATH=$NODE_PATH://home/mt/.nvm/versions/node/v0.12.4/lib/node_modules
cd /home/mt/mtServer/localhost_thonatos.com/bin && pm2 start ./pm2_product.json
fi
3.You may add a task for crontab:
# Open terminal and type:
crontab -e
# Add the task like:
@reboot /home/mt/mtServer/localhost_thonatos.com/bin/autoload.sh
# When you finish it,Use "ESC" and ":wq" to save it.