Skip to content
/ lock Public

Simple locking to avoid simultaneous executions of a shell script

Notifications You must be signed in to change notification settings

xsb/lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

lock

Simple locking for shell scripts. Start with . lock to avoid simultaneous executions.

#!/bin/sh
. lock

Additional parameters

$ lock -h
Usage: lock [-s <text>] [-i] [-t] [-e]

Options:
   -s <text>  Personalize error text
   -i         Trap INT signal
   -t         Trap TERM signal
   -e         (default) Trap EXIT signal
   -h         Show this help message

Install

sudo cp lock /usr/local/bin/lock

About

Simple locking to avoid simultaneous executions of a shell script

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages