File: jsonbot_start_linux.sh

package info (click to toggle)
jsonbot 0.84.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 5,632 kB
  • sloc: python: 56,224; sh: 250; makefile: 25
file content (13 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# use this in your crontab and copy this script
#
# thnx to Tuxillo of #dragonflybsd EFnet fame
#
#*/2     *       *       *       *       jsb-fleet         /usr/bin/flock -s -t0 /tmp/.bot /usr/local/bin/jsonbot_start.sh >> /dev/null 2>&;1

PATH=bin:$PATH
PIDFILE=~/.jsb/run/jsb.pid
PID=`cat $PIDFILE` 2>/dev/null

test -n "$PID" && ps auxw | grep -v grep | grep jsb-fleet | grep -q -s " $PID " && return 0
jsb-fleet