zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
595 stars 65 forks source link

Cannot start and stop the service #75

Open pravardhan opened 8 years ago

pravardhan commented 8 years ago

I want to install a few services without starting them. And then, i should be able to start and stop the services as needed. Currently, there's no way to start/stop/restart the provisioned services manually.

arvind-agarwal commented 8 years ago

Service is not automatically started when provisioned with forever-service, you could use regular service commands like service xxx start/stop/restart to manually control the service.

pravardhan commented 8 years ago

start and stop works fine. But restart seems to stop the service instead of restarting it

Jarvis785 commented 8 years ago

i had a simple LED blink code nodejs i have tested by command :node /home/pi/blink.js (its blinking !! working..)

sudo forever-service install IOT --script /home/pi/blink.js

sudo service IOT start (it gives no error) sudo service IOT status (it says running) IOT.service - LSB: forever-service startup script for IOT Loaded: loaded (/etc/init.d/IOT) Active: active (running) since Sat 2016-10-29 20:17:00 UTC; 1min 46s ago Process: 4217 ExecStart=/etc/init.d/IOT start (code=exited, status=0/SUCCESS) CGroup: /system.slice/IOT.service └─2835 /usr/bin/nodejs /usr/lib/node_modules/forever/bin/monitor /home/pi/myblynk.js

Oct 29 20:17:00 Pi-Jarvis IOT[4217]: Service IOT already running Oct 29 20:17:00 Pi-Jarvis systemd[1]: Started LSB: forever-service startup script for IOT.

But LED not blinking !! Why ?

plese check @arvind-agarwal