mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove accidental inclusions that will mess up future updates. (#7864)
composer_wrapper.php doesn't even exist :(
This commit is contained in:
Tony Murray
committed by
Neil Lathwood
parent
8ab0b2bffd
commit
0c36cd7a8b
18
daily.sh
18
daily.sh
@ -22,7 +22,6 @@
|
|||||||
# define DAILY_SCRIPT as the full path to this script and LIBRENMS_DIR as the directory this script is in
|
# define DAILY_SCRIPT as the full path to this script and LIBRENMS_DIR as the directory this script is in
|
||||||
DAILY_SCRIPT=$(readlink -f "$0")
|
DAILY_SCRIPT=$(readlink -f "$0")
|
||||||
LIBRENMS_DIR=$(dirname "$DAILY_SCRIPT")
|
LIBRENMS_DIR=$(dirname "$DAILY_SCRIPT")
|
||||||
COMPOSER="php ${LIBRENMS_DIR}/scripts/composer_wrapper.php"
|
|
||||||
|
|
||||||
# set log_file, using librenms $config['log_dir'], if set
|
# set log_file, using librenms $config['log_dir'], if set
|
||||||
# otherwise we default to <LibreNMS Install Directory>/logs
|
# otherwise we default to <LibreNMS Install Directory>/logs
|
||||||
@ -146,11 +145,6 @@ main () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure autoload.php exists before trying to run any php that may require it
|
|
||||||
if [ ! -f "${LIBRENMS_DIR}/vendor/autoload.php" ]; then
|
|
||||||
${COMPOSER} install --no-dev
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$arg" ]]; then
|
if [[ -z "$arg" ]]; then
|
||||||
status_run 'Checking PHP version' "php ${LIBRENMS_DIR}/daily.php -f check_php_ver" 'check_php_ver'
|
status_run 'Checking PHP version' "php ${LIBRENMS_DIR}/daily.php -f check_php_ver" 'check_php_ver'
|
||||||
|
|
||||||
@ -184,16 +178,8 @@ main () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$old_ver" != "$new_ver" ]]; then
|
if [[ "$old_ver" != "$new_ver" ]]; then
|
||||||
# status_run 'Updating Composer packages' "${COMPOSER} install --no-dev" 'update'
|
status_run "Updated from $old_ver to $new_ver" ''
|
||||||
|
set_notifiable_result update 1 # only clear the error if update was a success
|
||||||
# Run post update checks
|
|
||||||
if [ ! -f "${LIBRENMS_DIR}/vendor/autoload.php" ]; then
|
|
||||||
status_run "Reverting update, check the output of composer diagnose" "git checkout $old_ver" 'update'
|
|
||||||
set_notifiable_result update 0
|
|
||||||
else
|
|
||||||
status_run "Updated from $old_ver to $new_ver" ''
|
|
||||||
set_notifiable_result update 1 # only clear the error if update was a success
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Call ourself again in case above pull changed or added something to daily.sh
|
# Call ourself again in case above pull changed or added something to daily.sh
|
||||||
|
Reference in New Issue
Block a user