diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-11 13:52:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-11 13:53:02 +0000 |
commit | 9c47a33c9a0896eda85b22a1c0f16e96a27b6450 (patch) | |
tree | d91e6ec682020627be5653c4f3996f37b10da543 /libexec/container/log | |
parent | Releasing debian version 20210101-1. (diff) | |
download | open-infrastructure-compute-tools-9c47a33c9a0896eda85b22a1c0f16e96a27b6450.tar.xz open-infrastructure-compute-tools-9c47a33c9a0896eda85b22a1c0f16e96a27b6450.zip |
Merging upstream version 20210411.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | libexec/container/log (renamed from lib/container/log) | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/container/log b/libexec/container/log index a18c421..e514391 100755 --- a/lib/container/log +++ b/libexec/container/log @@ -15,15 +15,17 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -LOG="/var/log/${PROJECT}/${PROGRAM}.log" +HOOKS="/etc/${SOFTWARE}/hooks" +LOG="/var/log/${SOFTWARE}/${PROGRAM}.log" Parameters () { @@ -79,6 +81,16 @@ Usage () Parameters "${@}" +# Pre hooks +for FILE in "${HOOKS}/pre-${COMMAND}".* +do + if [ -x "${FILE}" ] + then + "${FILE}" + fi +done + +# Run case "${DATE}" in today-*) DAYS="$(echo ${DATE} | awk -F- '{ print $2 }')" @@ -141,3 +153,12 @@ do ;; esac done + +# Post hooks +for FILE in "${HOOKS}/post-${COMMAND}".* +do + if [ -x "${FILE}" ] + then + "${FILE}" + fi +done |