__netbox: new parameter for automatic release checks

This commit is contained in:
matze 2020-08-24 19:31:49 +02:00
parent 95fd7d872e
commit 7d694342ff
4 changed files with 24 additions and 4 deletions

View file

@ -253,11 +253,21 @@ RELEASE_CHECK_TIMEOUT = 24 * 3600
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the # This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
# version check or use the URL below to check for release in the official NetBox repository. # version check or use the URL below to check for release in the official NetBox repository.
RELEASE_CHECK_URL = None
# RELEASE_CHECK_URL = 'https://api.github.com/repos/netbox-community/netbox/releases'
EOF EOF
if [ "$UPDATE_CHECK" != "" ]; then
cat << EOF
RELEASE_CHECK_URL = None
EOF
else
cat << EOF
RELEASE_CHECK_URL = 'https://api.github.com/repos/netbox-community/netbox/releases'
EOF
fi
if [ "$REPORTS_ROOT" != "" ]; then if [ "$REPORTS_ROOT" != "" ]; then
cat << EOF cat << EOF
# The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of # The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of

View file

@ -163,8 +163,12 @@ smtp-use-ssl
for more information. for more information.
login-required login-required
Sets if a login is required to access all sites. By default, anounymous users Sets if a login is required to access all sites. By default, anonymous
can see most data (excluding secrets) but not make any changes. users can see most data (excluding secrets) but not make any changes.
update-notify
Enables the NetBox version check for new upstream updates. It checks every
24 hours for new releases and notify the admin users in the gui if any.
MESSAGES MESSAGES
-------- --------

View file

@ -168,6 +168,11 @@ if [ -f "$__object/parameter/scripts-root" ]; then
fi fi
export SCRIPTS_ROOT export SCRIPTS_ROOT
if [ -f "$__object/parameter/update-notify" ]; then
UPDATE_CHECK="yes"
export UPDATE_CHECK
fi
# Create system user used to run netbox. # Create system user used to run netbox.
__user netbox --system --home /opt/netbox --create-home __user netbox --system --home /opt/netbox --create-home

View file

@ -2,3 +2,4 @@ redis-ssl
smtp-use-ssl smtp-use-ssl
smtp-use-tls smtp-use-tls
login-required login-required
update-notify