Revision 56d0cca3
Added by Benoît PECCATTE over 7 years ago
share/commands/agent-factory-reset | ||
---|---|---|
# @man +
|
||
# @man *-m*: run the agent with multiline output
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
VERBOSE=false
|
||
QUIET=false
|
||
|
share/commands/agent-health | ||
---|---|---|
# @man put this line in your nrpe.cfg to use it
|
||
# @man command[check_rudder]=/opt/rudder/bin/rudder agent health -n
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
CFE_DIR=/var/rudder/cfengine-community
|
||
ENTERPRISE_CFE_DIR=/var/cfengine
|
||
CFE_DISABLE_FILE=/opt/rudder/etc/disable-agent
|
share/commands/agent-info | ||
---|---|---|
# @man what defines the node (hostname, uuid and key hash) and its
|
||
# @man policy server.
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
OS=$(uname -s)
|
||
|
||
if [ "${OS}" = "Linux" ]; then
|
share/commands/agent-reset | ||
---|---|---|
# @man +
|
||
# @man *-c*: run the agent without color output
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
VERBOSE=false
|
||
QUIET=false
|
||
|
share/commands/agent-run | ||
---|---|---|
# @man +
|
||
# @man *-f*: run the agent even if it is disabled
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
. "${BASEDIR}/../lib/cfengine_parsing.sh"
|
||
|
||
UPDATE=false
|
share/commands/agent-version | ||
---|---|---|
# @description get the agent version
|
||
# @man Displays the version of the Rudder agent and of the underlying CFEngine agent.
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
if [ -e /usr/bin/dpkg ]; then
|
||
AGENT_VERSION=$(dpkg-query -W --showformat='${Version}' rudder-agent)
|
||
elif [ -e /bin/rpm ]; then
|
share/commands/remote-run | ||
---|---|---|
# @man +
|
||
# @man *-C*: provide an alternate config section in ~/.rudder for group query (default to first found)
|
||
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
. "${BASEDIR}/../lib/cfengine_parsing.sh"
|
||
. "${BASEDIR}/../lib/api_call.sh"
|
||
|
share/commands/server-debug | ||
---|---|---|
# @man +
|
||
# @man *node*: IP or hostname of the host you want to debug
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
DEBUG_PORT=5310
|
||
SERVER_PORT=5309
|
||
DAEMON=/var/rudder/cfengine-community/bin/cf-serverd
|
share/commands/server-disable-policy-distribution | ||
---|---|---|
# @man This is useful when you want to temporarily prevent your Rudder server
|
||
# @man from doing any changes on your agents
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
# First, prevent the agent from restarting cf-serverd
|
||
touch /opt/rudder/etc/disable-policy-distribution
|
||
|
share/commands/server-enable-policy-distribution | ||
---|---|---|
# @man to allow the agent to restart the policy server.
|
||
# @man This will restart the policy server immediately.
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
# Allow the agent from restarting cf-serverd
|
||
rm -f /opt/rudder/etc/disable-policy-distribution
|
||
|
share/commands/server-reload-groups | ||
---|---|---|
# @man +
|
||
# @man *-c*: run the agent without color output
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
. "${BASEDIR}/../lib/api_call.sh"
|
||
|
||
DISPLAY_COMMAND=false
|
share/commands/server-reload-techniques | ||
---|---|---|
# @man +
|
||
# @man *-c*: run the agent without color output
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
. "${BASEDIR}/../lib/api_call.sh"
|
||
|
||
DISPLAY_COMMAND=false
|
share/lib/api_call.sh | ||
---|---|---|
# This file provide helpers to make API call from Rudder commands
|
||
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
if type curl >/dev/null 2>/dev/null
|
||
then
|
||
DOWNLOAD_COMMAND="curl --silent --show-error --insecure --location --proxy ''"
|
share/lib/cfengine_parsing.sh | ||
---|---|---|
|
||
. "${BASEDIR}/../lib/common.sh"
|
||
|
||
PRETTY_FILTER="${BASEDIR}/../lib/reports.awk"
|
||
|
||
BUNDLE=""
|
share/lib/common.sh | ||
---|---|---|
# Warn on potentially invalid arguments
|
||
if grep -- -- "$*" > /dev/null
|
||
then
|
||
echo "Warning: Long arguments are not supported, you probably tried to use one!"
|
||
fi
|
||
|
||
# Reset colors
|
||
clear_colors() {
|
||
COLOR=""
|
Also available in: Unified diff
Fixes #9658: Warn the user when he tries to use long arguments with rudder agent