0

i would like to use npm_lazy as a local for npm.

i installed npm_lazy and all works perfect.

starting the server using

npm_lazy --config ~/custom_config/npm_lazy.config.js

works.

but how can i add this command to the startup of the linux server. i am running Ubuntu 14.04.3 LTS.

i tried:

vi /etc/init.d/npm_lazy

chmod ugo+x /etc/init.d/npm_lazy

npm_lazy

#!/bin/sh
/path/to/my/script.sh

script.sh

#!/bin/sh
sudo npm_lazy --config ~/custom_config/npm_lazy.config.js

finally

update-rc.d npm_lazy defaults

JuKe
  • 663
  • 2
  • 7
  • 20

1 Answers1

0

create a file called npm_lazy.desktop in a folder called ~/.config/autostart and copy the below code and restart

[Desktop Entry]
Type=Application
Exec=npm_lazy --config ~/custom_config/npm_lazy.config.js
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_IN]=Npm_Lazy
Name=Npm_Lazy
Comment[en_IN]=npm server lazy
Comment=npm lazy server
Ankanna
  • 737
  • 2
  • 8
  • 21