Getting NOMP to run at reboot on Ubuntu

There are several things you must do to accomplish this without any user intervention. It is up to you to decide if any of these pose as a security risk depending on your situation.

  1. Enable your user to automatically login
  2. Start all your CryptoCoins at login
  3. Unlock all your CryptoCoin Wallets at login
  4. Run NOMP as root

Enable your user to automatically login:

  • System Settings
  • User Accounts
  • Automatic Login

Start all your CryptoCoins at login:

    • Create a script for each coin “run_bitcoin-qt”
/usr/local/bin/bitcoin-qt -server
    • Create a “start_all_coin_wallets” script
echo Starting Crypto Coins...
/usr/local/bin/bitcoin-qt -server &
/usr/local/bin/mazacoin-qt -server &
/usr/local/bin/titcoin-qt -server &
/usr/local/bin/UniversalCurrency-qt -server &
/usr/local/bin/zetacoin-qt -server &
echo Wallets Started.
  • Here is the daemon version. ¬†Seems to be more stable, but you have to compile the daemon’s for each coin.
echo Starting Crypto Coins...
/usr/local/bin/bitcoind -daemon &
/usr/local/bin/mazacoind -daemon &
/usr/local/bin/titcoind -daemon &
/usr/local/bin/UniversalCurrencyd -daemon &
/usr/local/bin/zetacoind -daemon &
echo Wallets Started.
  • Add the “start_all_coin_wallets” script to “Startup Applications”

Unlock all your CryptoCoin Wallets at login:

  • Create a script that passes the “walletpassphrase” command
  • Example:
    /usr/local/bin/bitcoin-cli walletpassphrase "this should be your passphrase in these quotes" 9999999
    
  • Since you don’t know how long it will take to bootup all your wallets, you can set this to run every 5 minutes just to be sure.
    • Do this by adding it to the “Scheduled Tasks”

Run NOMP as root

  • Why? because “node” needs to run as root or your website won’t work.
  • Create a “run_nomp” script, something like this
    echo Starting NOMP...
    cd /home/yourusername/www/nomp
    sudo node init.js
    
  • You will have to add a line to /etc/sudoers
    yourusername ALL=(ALL) NOPASSWD:ALL
  • Add “run_nomp” to “Startup Applications”
    gnome-terminal -e "/home/yourusername/bin/run_nomp"
    

Reboot your server and watch it boot up.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.