diff --git a/README.adoc b/README.adoc index 09548fe..4b4e66e 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ :author: Jürgen Orth :email: Juergen.Orth@Fujitsu.com -:version: v1.0.8 +:version: v1.0.9 :imagesdir: img/ :toc: preamble @@ -33,6 +33,7 @@ IMPORTANT: *#Please note: This toolset is provided W/O ANY WARRANTY and is to be [cols="5%,10%,65%,20%"] |================= |Version|Date|Description|Author +|1.0.9|2023-03-08|+ `ism_get_snap`: Snapfile will be deleted on ISM-VA after it has been downloaded.|mailto:{email}[{Author}] |1.0.8|2023-03-03|+ Added missing command in commandlist of README|mailto:{email}[{Author}] |1.0.7|2023-02-28| * New commands `ism_get_groupname`, `ism_get_snapfile`, `ism_copy_2ds` + @@ -199,7 +200,7 @@ Deletes given ISO. Without param the command runs in interactive mode. ---- #!/bin/bash # (c) Juergen Orth ;-) -# $Id: README.adoc 172 2023-03-03 07:44:09Z HMBJOrth $ +# $Id: README.adoc 173 2023-03-08 13:18:15Z HMBJOrth $ # for documentation see https://github.com/fujitsu/ISMtools # # Settings and tools for ISMtools based on bash and curl @@ -662,7 +663,7 @@ $ ism_get_sysrep EWAL001056 [[ism_get_snap]] ==== `ism_get_snap [-t ] [-m part|full] [-c]` -Creates and downloads an ISM snap file (ZIP format) that can be used for support issues. You can specify the period in _days_ of log files that should be retrieved by parameter `-t`. If no time spec is given then default value _SNAPDAYS_ defined in <> is used. Using `-m` option allows to define whether to generate a full or a partial snap. Default _SNAPMODE_ is defined in <>. With option `-c` the snap file is copied afterwards to Fujitsu\'s SFTP server to directory `/incoming`. +Creates and downloads an ISM snap file (ZIP format) that can be used for support issues. You can specify the period in _days_ of log files that should be retrieved by parameter `-t`. If no time spec is given then default value _SNAPDAYS_ defined in <> is used. Using `-m` option allows to define whether to generate a full or a partial snap. Default _SNAPMODE_ is defined in <>. With option `-c` the snap file is copied afterwards to Fujitsu\'s SFTP server to directory `/incoming`. After downloading the snap file to your local machine it is deleted at the ISM-VA. [source,shell,indent=8] ---- @@ -674,7 +675,8 @@ $ ism_get_snap -m full -t 2 2023-02-28 10:17:25 -- Complete Success 2023-02-28 10:17:30 -- Starting download of snapfile ... 2023-02-28 10:17:30 -- Snapfile ismsnap-77-20230228101537-20230226-20230301-20230226-20230301-full.zip (Size=13M/Type=ZIP) -2023-02-28 10:17:30 -- Logging out +2023-02-28 10:17:31 -- Deleting snapfile on ISM_VA +2023-02-28 10:17:35 -- Logging out ---- [[ism_copy_2ds]] diff --git a/doc/ISMtools v1.0.8.pdf b/doc/ISMtools v1.0.9.pdf similarity index 53% rename from doc/ISMtools v1.0.8.pdf rename to doc/ISMtools v1.0.9.pdf index 064e0ba..9c2c3cf 100755 Binary files a/doc/ISMtools v1.0.8.pdf and b/doc/ISMtools v1.0.9.pdf differ diff --git a/scripts/ism_get_snap b/scripts/ism_get_snap index f1b3818..624bcfc 100755 --- a/scripts/ism_get_snap +++ b/scripts/ism_get_snap @@ -1,6 +1,6 @@ #!/bin/bash # (c) Juergen Orth ;-) -# $Id: ism_get_snap 171 2023-02-28 13:54:46Z HMBJOrth $ +# $Id: ism_get_snap 173 2023-03-08 13:18:15Z HMBJOrth $ # for documentation see https://github.com/fujitsu/ISMtools . ${0%/*}/.ism_env @@ -50,6 +50,14 @@ echo 'user = "'$ISM_USER'"' | curl -K - -o ${file##*/} -k $CURLOPTIONS $file SIZE=$(ls -lGh ${file##*/} | awk '{print $4}') showinfo " Snapfile ${file##*/} (Size=$SIZE/Type=ZIP)" +showinfo "Deleting snapfile on ISM_VA" +ism_cmd post system/settings/file/delete -d ' +{ + "IsmBody": { + "Path": "'${file#ftp://*/}'" + } +}' | jq '.MessageInfo[].Message' + if [ $KEEPSESSION == false ] then showinfo "Logging out"