Autostarting loader.js
-
Hi,
I'm usually starting my nodebb forum by switching into the nodebb dir and then do:
sudo node ./loader start
works, but doesn't start when the system is rebooting. I tried to add the command to to a scriptfile and exec it in
/etc/xdg/autostart/
But then I found out that using the whole path of loader.js doesn't work. so ie:sudo node /var/www/mynodebb/loader start
doesn't work but changing into the mynodebb dir and typesudo node ./loader start
works... Can somebody explain me what I'm doing wrong?
thanks & regards
Flo -
Had the same problem. What keeps you from just using
cd /var/www/mynodebb/ && sudo ./nodebb start
? -
So I tried the command
cd /var/www/mynodebb/ && sudo ./nodebb start
and it worked manually like a charme but when I try to auto start this as a script it still fails, here is what I did (running ubuntu 14.04 lts @ ec2 instance):- sudo vi /usr/local/bin/autostart.sh
#!/bin/sh cd /var/www/mynodebb && sudo ./nodebb start
-
sudo chmod 4755 autostart.sh
-
sudo vi /etc/xdg/autostart/vmware-user.desktop
[Desktop Entry] Type=Application Encoding=UTF-8 Exec=/usr/bin/vmware-user-suid-wrapper Name=VMware User Agent # KDE bug 190522: KDE does not autostart items with NoDisplay=true... # NoDisplay=true X-KDE-autostart-phase=1 exec=/usr/local/bin/autostart.sh
doesn't work... but as I' reading this I might guess that it doesn't work because I don't load any "Desktop" or GUI!? I use this method because of the autostart wiki of ubuntu