#!/bin/sh

MANAGER_LOCK_FILE=/tmp/manager.lck

manager_lock_exists () {
    if [ -f ${MANAGER_LOCK_FILE} ]; then
        return 0
    fi
    return 1
}

manager_lock_create () {
    manager_lock_exists && return 1
    touch ${MANAGER_LOCK_FILE}
    return 0
}

manager_lock_remove () {
    ! manager_lock_exists && return 1
    rm -f ${MANAGER_LOCK_FILE}
    return 0
}
