Autostarting loader.js

Technical Support
  • #1


    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 type

    sudo node ./loader start

    works... Can somebody explain me what I'm doing wrong?

    thanks & regards

  • #2

    Had the same problem. What keeps you from just using
    cd /var/www/mynodebb/ && sudo ./nodebb start?

  • #3

    The fact that I'm too f00lish to know that I can use a command chain by && ^^ will try

  • GNU/Linux

    Just some thoughts: NodeBB does not need root permissions to run, unless you are listening directly on a port lower than 1024.

    Secondly, yeah, try switching current directory before running ./nodebb start

  • #5

    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):

    1. sudo vi /usr/local/bin/
    cd /var/www/mynodebb && sudo ./nodebb start
    1. sudo chmod 4755

    2. sudo vi /etc/xdg/autostart/vmware-user.desktop

    [Desktop Entry]
    Name=VMware User Agent
    # KDE bug 190522: KDE does not autostart items with NoDisplay=true...
    # NoDisplay=true

    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

Suggested Topics

| | | |