diff options
author | M.Gergo | 2019-03-08 20:50:48 +0100 |
---|---|---|
committer | M.Gergo | 2019-03-08 20:50:48 +0100 |
commit | 3dab26c6797b32926287f22a041380080551060b (patch) | |
tree | bb4ba41398083a054e956e25f2d8c72bcdd0a7a0 /mayor-jav/mayor-base-jav/bin/lock.sh | |
parent | f70027ffbedce10f412868a7bf9b0b67b113f1b1 (diff) | |
download | mayor-3dab26c6797b32926287f22a041380080551060b.tar.gz mayor-3dab26c6797b32926287f22a041380080551060b.zip |
pici rendrakás
Diffstat (limited to 'mayor-jav/mayor-base-jav/bin/lock.sh')
-rw-r--r-- | mayor-jav/mayor-base-jav/bin/lock.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mayor-jav/mayor-base-jav/bin/lock.sh b/mayor-jav/mayor-base-jav/bin/lock.sh new file mode 100644 index 00000000..ca275705 --- /dev/null +++ b/mayor-jav/mayor-base-jav/bin/lock.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +help_usage() { +cat <<EOF + +LOCK használata: mayor lock [options] + +A parancs segítségével zárolhatjuk a MaYoR rendszert, ilyenkor a webes elérés le van tiltva. +Hasznos lehet különböző Rendszergazdai műveletek elvégzésekor. + + --help: ^Ez a help szöveg. + +EOF +} + +if [ $? -ne 0 ]; then help_usage; exit; fi + +while [ $# -ge 1 ]; do + case $1 in + --help | -h ) help_usage + exit + ;; + + -- ) shift + break + ;; + + * ) echo "HIBA: ismeretlen opció: $1" + exit + ;; + esac + shift +done + +if [ ! -z $LOCKFILE ]; then + if [ $VERBOSE -gt 0 ]; then echo -e "* A web-es elérés letiltása:"; fi + if [ $VERBOSE -gt 1 ]; then echo -e "- Lock-file létrehozása... "; fi + + echo "$DATE: Rendszergazda dolgozik" > $LOCKFILE + if [ $VERBOSE -gt 0 ]; then echo -e "kész.\n"; fi +fi + |