WhatPulse Forums » Support » Client software v » script to check if running or not Welcome back, Guest.


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script to check if running or not
07-09-2013, 02:00 PM
Post: #1
script to check if running or not
I am wondering if anyone has written a script to check if the whatpulse client is running, and if it is not to start it.

My whatpulse client quite often does not start, and even locks up. I have to kill it and start it again. It's a real shame, I love whatpulse but I really wish they get it working better on Ubuntu.

I wrote a simple script, which works when I run it, but when I insert it into a cronjob it won't. I have tried putting my username before the cronjob etc, but just will not work. Thinking maybe to install monit, but a bit overkill just for WP.

Code:
#!/bin/sh

RESULT=`ps -A | sed -n /whatpulse/p`

if [ "${RESULT:-null}" = null ]; then
    echo "whatpulse not running    "
    screen -d -m /home/me/.whatpulse-bin/whatpulse
else
    echo "whatpulse running"
fi
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Having trouble running whatpulse on Neon Linux BlackWidow 1 69 12-03-2019 12:02 AM
Last Post: Adrriii
  Whatpulse isn't running after upgrading Ubuntu 1geeky 0 261 08-06-2019 05:46 AM
Last Post: 1geeky
  [SOLVED] .sh permissions script fatsa 4 1,928 08-04-2015 12:02 AM
Last Post: LukeLR
  [SOLVED] Check for updates doesn't work through proxy Bloopy 0 5,038 09-24-2013 08:05 AM
Last Post: Bloopy
  "Already Running" on startup Bukowskaii 5 6,845 02-25-2013 09:02 AM
Last Post: Bukowskaii
  Running on Chromebook London_Ash 0 3,170 02-06-2013 10:06 PM
Last Post: Suck My Trend
  'Already running' on startup 183426 4 5,101 01-25-2013 04:56 AM
Last Post: WOWVern
  whatpulse 2 crashes when running my 3g modem software cwboshoff 3 5,228 01-18-2013 06:19 AM
Last Post: cwboshoff
Bug Double mouse click count when XMBC is running TechnoGeek 3 5,153 01-10-2013 08:32 PM
Last Post: SwooshyCueb
  Linux segfault instantly when running HarryHy 2 2,181 08-19-2011 07:54 PM
Last Post: jmrk

Forum Jump:


User(s) browsing this thread: 1 Guest(s)