Sha256: 7185b08a8f9d380a932c30af393c735cb8d9c10a3f8d31963ce110d2166b76eb

Contents?: true

Size: 954 Bytes

Versions: 31

Compression:

Stored size: 954 Bytes

Contents

#!/bin/bash -e
set -e

### BEGIN INIT INFO
# Provides:          automateit_service_test
# Default-Start:     5
# Default-Stop:      6
# Short-Description: automateit_service_test
# Description:       automateit_service_test
### END INIT INFO

STATE="/tmp/automateit_service_test.state"
status() {
    test -f $STATE;
}
case $1 in
    start)
        if status; then
            echo "ERROR: already running"
            exit 1
        else
            echo "started"
            touch $STATE
            exit 0
        fi
    ;;
    stop)
        if status; then
            echo "stopping"
            rm $STATE
            exit 0
        else
            echo "ERROR: not running"
            exit 1
        fi
    ;;
    status)
        if status; then
            echo "running"
            exit 0
        else
            echo "not running"
            exit 1
        fi
    ;;
    *)
        echo "ERROR: unknown command"
        exit 1
    ;;
esac

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
automate-it-0.9.2 spec/extras/automateit_service_sysv_test
automate-it-0.9.1 spec/extras/automateit_service_sysv_test
automate-it-0.9.0 spec/extras/automateit_service_sysv_test
automateit-0.70930 spec/extras/automateit_service_sysv_test
automateit-0.71003 spec/extras/automateit_service_sysv_test
automateit-0.70923 spec/extras/automateit_service_sysv_test
automateit-0.70928 spec/extras/automateit_service_sysv_test
automateit-0.71030 spec/extras/automateit_service_sysv_test
automateit-0.71031.1 spec/extras/automateit_service_sysv_test
automateit-0.71031.2 spec/extras/automateit_service_sysv_test
automateit-0.71012 spec/extras/automateit_service_sysv_test
automateit-0.71006 spec/extras/automateit_service_sysv_test
automateit-0.71017 spec/extras/automateit_service_sysv_test
automateit-0.71021 spec/extras/automateit_service_sysv_test
automateit-0.71031 spec/extras/automateit_service_sysv_test
automateit-0.71103 spec/extras/automateit_service_sysv_test
automateit-0.71101 spec/extras/automateit_service_sysv_test
automateit-0.71102 spec/extras/automateit_service_sysv_test
automateit-0.71101.2 spec/extras/automateit_service_sysv_test
automateit-0.71101.1 spec/extras/automateit_service_sysv_test