mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
if no code is updated, do a schema update check and also a cleanup. move to a separate script call to make it easier to add more tasks if required in the future.
This commit is contained in:
11
daily.sh
11
daily.sh
@@ -34,9 +34,8 @@ status_run() {
|
||||
if [ -z "$arg" ]; then
|
||||
up=$(php daily.php -f update >&2; echo $?)
|
||||
if [ "$up" -eq 0 ]; then
|
||||
# Updates are disabled.
|
||||
status_run 'Cleaning up DB' "$0 cleanup"
|
||||
exit $?
|
||||
$0 no-code-update
|
||||
exit
|
||||
elif [ "$up" -eq 1 ]; then
|
||||
# Update to Master-Branch
|
||||
status_run 'Updating to latest codebase' 'git pull --quiet'
|
||||
@@ -53,6 +52,12 @@ if [ -z "$arg" ]; then
|
||||
fi
|
||||
else
|
||||
case $arg in
|
||||
no-code-update)
|
||||
# Updates of the code are disabled, just check for schema updates
|
||||
# and clean up the db.
|
||||
status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
|
||||
status_run 'Cleaning up DB' "$0 cleanup"
|
||||
;;
|
||||
post-pull)
|
||||
# List all tasks to do after pull in the order of execution
|
||||
status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
|
||||
|
Reference in New Issue
Block a user