pfSense-pkg-saml2-auth

Update

Table of Contents

Constants

PKG_STATIC_EXEC  = '/usr/local/sbin/pkg-static'
RELEASES_CACHE_FILE  = '/var/cache/pfSense-pkg-saml2-auth/releases.json'
RELEASES_FETCH_TIMEOUT  = 10
RELEASES_URL  = 'https://api.github.com/repos/pfrest/pfSense-pkg-saml2-auth/releases'

Functions

get_pfsense_version()  : string
Obtains the current version of pfSense running on this system.
get_pfsense_base_version()  : string
Obtains the base version of pfSense running on this system.
get_pkg_version()  : string
Obtains the current version of the pfSense-pkg-saml2-auth package installed on this system.
get_latest_pkg_version()  : string
Obtains the latest package release version available for download on this system.
get_latest_pkg_release_date()  : string
Obtains the release date of the latest package version available for download on this system.
is_update_available()  : bool
Checks if an update is available for the pfSense-pkg-saml2-auth package.
fetch_pkg_releases()  : array<string|int, mixed>
Fetches current package releases from GitHub. This method always fetches the latest releases from the GitHub API, it does not attempt to read from the cache.
get_pkg_releases()  : array<string|int, mixed>
Obtains package releases from the cache file.
get_supported_pkg_releases()  : array<string|int, mixed>
Obtains the package releases that are supported by the running pfSense version.
update_pkg()  : void

Constants

PKG_STATIC_EXEC

public mixed PKG_STATIC_EXEC = '/usr/local/sbin/pkg-static'

RELEASES_CACHE_FILE

public mixed RELEASES_CACHE_FILE = '/var/cache/pfSense-pkg-saml2-auth/releases.json'

RELEASES_FETCH_TIMEOUT

public mixed RELEASES_FETCH_TIMEOUT = 10

RELEASES_URL

public mixed RELEASES_URL = 'https://api.github.com/repos/pfrest/pfSense-pkg-saml2-auth/releases'

Functions

get_pfsense_version()

Obtains the current version of pfSense running on this system.

get_pfsense_version() : string
Return values
string

The current pfSense version, formatted as x.x or x.x.x.

get_pfsense_base_version()

Obtains the base version of pfSense running on this system.

get_pfsense_base_version() : string
Tags
throws
SystemError

If the version cannot be determined or is not in the expected format.

Return values
string

The base pfSense version, formatted as x.x.

get_pkg_version()

Obtains the current version of the pfSense-pkg-saml2-auth package installed on this system.

get_pkg_version() : string
Return values
string

The current package version, formatted as x.x or x.x.x.

get_latest_pkg_version()

Obtains the latest package release version available for download on this system.

get_latest_pkg_version() : string
Return values
string

Returns the latest package version available for download.

get_latest_pkg_release_date()

Obtains the release date of the latest package version available for download on this system.

get_latest_pkg_release_date() : string
Return values
string

Returns the release date of the latest package version or empty string if not found.

is_update_available()

Checks if an update is available for the pfSense-pkg-saml2-auth package.

is_update_available() : bool
Return values
bool

Returns true if an update is available, false otherwise.

fetch_pkg_releases()

Fetches current package releases from GitHub. This method always fetches the latest releases from the GitHub API, it does not attempt to read from the cache.

fetch_pkg_releases() : array<string|int, mixed>
Tags
throws
SystemError

If the fetch fails due to a cURL error.

Return values
array<string|int, mixed>

Returns array of all available package releases, or empty array if the response was empty.

get_pkg_releases()

Obtains package releases from the cache file.

get_pkg_releases() : array<string|int, mixed>
Return values
array<string|int, mixed>

Returns array of all available package releases, or empty array if the cache is empty.

get_supported_pkg_releases()

Obtains the package releases that are supported by the running pfSense version.

get_supported_pkg_releases() : array<string|int, mixed>
Return values
array<string|int, mixed>

Returns an array of package releases supported by the current pfSense version. The array is indexed by the release tag name and contains a 'name' and 'pkg_install_url' for each supported release.

update_pkg()

update_pkg([mixed $version = null ]) : void
Parameters
$version : mixed = null

string|null The version tag name to update/revert to or null to update to the latest version.

Tags
throws
UpdateError

If the requested version does not exist or is not supported.

throws
UpdateError

If the package removal or installation fails during the update process.


        
On this page

Search results