diff --git a/github/check.ceph.update b/github/check.ceph.update index 65bba5a..56f9697 100755 --- a/github/check.ceph.update +++ b/github/check.ceph.update @@ -1,6 +1,6 @@ #!/bin/sh # Purpose {{{ -## Create a temp file (to monitor) if an upgrade is available for Ceph +## Create a file (to monitor) if an upgrade is available for Ceph ## project on Github. ## It's based on .deb package (or repository) installation to check the ## current version. @@ -10,7 +10,7 @@ # wget https://git.ipr.univ-rennes1.fr/cellinfo/scripts/raw/master/github/releasetags ### 2. Create a cron job, eg : #00 20 * * * root /opt/repos/ipr.scripts/github/check_ceph_update -### 3. Monitor the temp file : /tmp/.github.ceph.upgrade +### 3. Monitor the file : /srv/.github.ceph.upgrade # Or enable MAILTO in cronjob and edit the script to print a message. # Or send a mail. # … @@ -50,14 +50,14 @@ ceph_new_version=$("${script_wd}"/releasetags "${ceph_repo_url}" | \ head -n1 | \ sed 's/v//g') -ceph_new_version_file="/tmp/.github.ceph.upgrade" +ceph_new_version_file="/srv/.github.ceph.upgrade" # }}} # Check if the current version is the last one {{{ if [ "${ceph_current_version}" != "${ceph_new_version}" ]; then [ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Test version — Current version (${ceph_current_version}) and new one (${ceph_new_version}) seems to be different." - ## Create a temp file to monitor + ## Create a file to monitor touch -- "${ceph_new_version_file}" printf '\e[1;35m%-6s\e[m\n' "An upgrade is available for Ceph (current : ${ceph_current_version}) : ${ceph_new_version}." >> "${ceph_new_version_file}"