Github-ceph: Move file to monitor to /srv/
It's better to keep "update file" even after a reboot cause Ceph is not necessarily automatically upgrade when a new version is release. It's better to wait few days to avoid possibles regressions.
This commit is contained in:
parent
ea792f4d43
commit
7bef77a04e
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue