Xen Orchestra on Ubuntu 15.10 - Complete installation instructions
-
@scottalanmiller said:
This will stop it, if you run it as expected and nothing else is running like it:
kill $(ps aux | grep "npm start" | grep -v grep | cut -d' ' -f8)
Will test in a moment.
Have to complete another job real fast.
-
Where the problem lies is that npm does not appear to store the PID anywhere on its own. Could we had that manually to the cron job? Of course, but that would not be universal by any stretch and we'd be left with a script that only worked with that specific means of starting.
-
kill $(ps aux | grep "npm start" | grep -v grep | cut -d' ' -f8)
Doesn't work.
-
What is your output of...
ps aux | grep "npm start" | grep -v grep | cut -d' ' -f8
and...
ps aux | grep "npm"
-
@scottalanmiller said:
Where the problem lies is that npm does not appear to store the PID anywhere on its own. Could we had that manually to the cron job? Of course, but that would not be universal by any stretch and we'd be left with a script that only worked with that specific means of starting.
This sounds like one of those "It would be really easy to do with an init/systemd script", that nobody has the time to spend working on currently. (If I did, I'd write one.)
-
This appears to work:
kill $(ps aux | grep "node bin/xo-server" | grep -v grep | cut -d' ' -f8)
-
That is exactly what is needed. If this was the old init style, I know it pretty well. Have made a lot of those. Don't know how it works on Ubuntu 15.10.
Although we'd need to package this all up, but that's not that hard.
We are getting closer and closer to making an RPM here.
-
@Danp said:
This appears to work:
kill $(ps aux | grep "node bin/xo-server" | grep -v grep | cut -d' ' -f8)
Interesting. Good call.
-
@Danp said:
This appears to work:
kill $(ps aux | grep "node bin/xo-server" | grep -v grep | cut -d' ' -f8)
Confirmed.
-
So this script should work.
Going to update my script and test.
-
I'm going to modify the update script to reboot immediately when done updating, 2 minutes just feels way to long.
-
Or better yet... now that we know how...
Stop the XO server... do the updates... start the XO Server... no reboot required.
-
Reboots are kind of critical to know if anything is broken.....
-
@DustinB3403 said:
Reboots are kind of critical to know if anything is broken.....
Only in Windows, lol.
-
And since we're using cron to start the job, it's more easily handled there.
Uptime of weeks or months is no good for any system.
Regardless of how awesome it is.
-
@dafyre said:
@DustinB3403 said:
Reboots are kind of critical to know if anything is broken.....
Only in Windows, lol.
Any system that is getting properly patched.
-
Can't seem to get the startup script working with cron. Entered the command:
chmod +x xo-start.sh
What did I miss?
-
@Danp Did you run it with sudo?
-
@Danp said:
Can't seem to get the startup script working with cron. Entered the command:
chmod +x xo-start.sh
What did I miss?
That just makes the script executable.
-
Try it from /etc/rc.local ?