5.2.11.3. ON Sensor scripts

On the ON Sensor, we can find different scripts on the following path:

ls /usr/share/opennac/sensor/scripts

5.2.11.4. configUpdates.sh

Description:

This script permits configure the credentials for repository and proxy to permit updating the ON Sensor. There are two cases:

  • Repo: Configure credentials for accessing the repo.

    • Add: Adding the repo user and password it will configure the opennac.repo file.

    • Delete: Removes the credentials configured.

  • Proxy: Configure credentials for accessing the proxy.

    • Add: Adding the proxy url, user and password it will configure the yum.conf file.

    • Delete: Removes the credentials configured. The url is needed.

Execution parameters:

/usr/share/opennac/sensor/scripts/configUpdates.sh (--proxy|--repo) (--add|--delete) [OPTIONS]

OPTIONS:

--repouser

username credentials for repo (asked interactively if absent)

--repopass

password for repo (asked interactively if absent)

--proxyurl

Mandatory when configuring proxy: ex: http://10.20.30.100:8080

--proxyuser

username credentials for proxy (asked interactively if absent: optional)

--proxypass

password credentials for proxy (asked interactively if absent: optional)

Example:

/usr/share/opennac/sensor/scripts/configUpdates.sh --proxy --add --proxyurl http://10.20.30.100:8080 --proxyuser admin --proxypass adminpass123!
/usr/share/opennac/sensor/scripts/configUpdates.sh --repo --add  --repouser admin --repopass adminpass123!
/usr/share/opennac/sensor/scripts/configUpdates.sh --proxy --delete --proxyurl http://10.20.30.100:8080
/usr/share/opennac/sensor/scripts/configUpdates.sh --repo --delete