diff options
-rwxr-xr-x | computer-time-limit | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/computer-time-limit b/computer-time-limit index 8ca0515..e072d62 100755 --- a/computer-time-limit +++ b/computer-time-limit @@ -5,11 +5,6 @@ url='https://eckner.net/computer-time-limit.php' lock_file=~/.computer-time-limit.lock -exec 9> "${lock_file}" -if ! flock -n 9; then - exit -fi - if [ -d "${dir}"'/.git' ] && [ $# -eq 0 ] && [ "$(stat -c%U "${dir}"'/.git')" = "$(whoami)" ]; then git -C "${dir}" fetch --all -p 2>/dev/null if [ -z "$(git -C "${dir}" status --porcelain)" ]; then @@ -18,6 +13,11 @@ if [ -d "${dir}"'/.git' ] && [ $# -eq 0 ] && [ "$(stat -c%U "${dir}"'/.git')" = fi fi +exec 9> "${lock_file}" +if ! flock -n 9; then + exit +fi + . /etc/computer-time-limit.conf sende_msg() { |