diff options
author | M.Gergo | 2018-07-06 11:13:06 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-06 11:13:06 +0200 |
commit | 50310b0e4513ee3fcce67351ae61e8fff851130e (patch) | |
tree | fd2e4a73f94a61cd5040f863579149ed97c701a3 /mayor-mod/bin/lock.sh | |
parent | 630f5353ed7a264b0fa17badd62f71a02265a4f7 (diff) | |
download | mayor-50310b0e4513ee3fcce67351ae61e8fff851130e.tar.gz mayor-50310b0e4513ee3fcce67351ae61e8fff851130e.zip |
Mappák átnevezve: mayor --> mayor-mod; mayor-installer --> mayor-installer-mod; mayor-installer-fcgi --> mayor-installer-fcgi-mod
Diffstat (limited to 'mayor-mod/bin/lock.sh')
-rw-r--r-- | mayor-mod/bin/lock.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mayor-mod/bin/lock.sh b/mayor-mod/bin/lock.sh new file mode 100644 index 00000000..ca275705 --- /dev/null +++ b/mayor-mod/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 + |