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
automateit-0.71112 spec/extras/automateit_service_sysv_test
automateit-0.71111 spec/extras/automateit_service_sysv_test
automateit-0.71220 spec/extras/automateit_service_sysv_test
automateit-0.71221 spec/extras/automateit_service_sysv_test
automateit-0.71104 spec/extras/automateit_service_sysv_test
automateit-0.71219 spec/extras/automateit_service_sysv_test
automateit-0.71226.1 spec/extras/automateit_service_sysv_test
automateit-0.80624 spec/extras/automateit_service_sysv_test
automateit-0.80116 spec/extras/automateit_service_sysv_test
automateit-0.71226 spec/extras/automateit_service_sysv_test
automateit-0.71230 spec/extras/automateit_service_sysv_test