Launch maco upgrade
This commit is contained in:
parent
2257ab7742
commit
17e8e0027d
|
@ -4,8 +4,9 @@
|
|||
# 1. All SGE queues are disable
|
||||
# 2. No SGE jobs are running
|
||||
# 3. No process related to Maco are already running
|
||||
# 4. No process related to APT are currently running
|
||||
|
||||
# This script can be call by a cronjob (eg. hourly)
|
||||
# This script can be called by a cronjob (eg. hourly)
|
||||
|
||||
# Vars {{{
|
||||
readonly PROGNAME=$(basename "${0}")
|
||||
|
@ -219,6 +220,15 @@ procs running (with the pattern: ${RED}${local_proc_pattern}${COLOR_DEBUG}) on t
|
|||
|
||||
return "${return_proc_running}"
|
||||
|
||||
}
|
||||
# }}}
|
||||
upgrade_maco() { # {{{
|
||||
|
||||
debug_message "upgrade_maco − \
|
||||
Try to apply Maco upgrade".
|
||||
|
||||
/opt/maco/bin/maco.autoupdate.sh
|
||||
|
||||
}
|
||||
# }}}
|
||||
main() { # {{{
|
||||
|
@ -234,7 +244,7 @@ main() { # {{{
|
|||
apt_proc_pattern="(aptitude.*full-upgrade|/usr/bin/dpkg.*--configure|dpkg-deb|/bin/sh /usr/lib/needrestart/dpkg-status)"
|
||||
|
||||
## If APT package upgrade is available
|
||||
### Exit (wait for APT upgrade to finish first)
|
||||
### Exit (wait for APT upgrade to be applied first)
|
||||
is_apt_upgrade_present \
|
||||
&& exit 0
|
||||
|
||||
|
@ -263,6 +273,11 @@ main() { # {{{
|
|||
is_proc_running "${apt_proc_pattern}" \
|
||||
&& exit 0
|
||||
|
||||
## Upgrade Maco
|
||||
### If error: Exit 50
|
||||
upgrade_maco \
|
||||
|| exit 50
|
||||
|
||||
}
|
||||
# }}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue