aboutsummaryrefslogtreecommitdiff
path: root/network/sickrage/rc.sickrage
diff options
context:
space:
mode:
Diffstat (limited to 'network/sickrage/rc.sickrage')
-rw-r--r--network/sickrage/rc.sickrage9
1 files changed, 6 insertions, 3 deletions
diff --git a/network/sickrage/rc.sickrage b/network/sickrage/rc.sickrage
index 89918979252a4..a5aa2e5fe28b8 100644
--- a/network/sickrage/rc.sickrage
+++ b/network/sickrage/rc.sickrage
@@ -23,10 +23,13 @@ done
# Check if the pid file exists
check() {
+ STATUS=stopped
if [ -e $PIDFILE ]; then
- STATUS=running
- else
- STATUS=stopped
+ if ps -p $(cat $PIDFILE); then
+ STATUS=running
+ else
+ STATUS=stopped
+ fi
fi
}