#!/bin/sh
# @description Re-enable Rudder to distribute new policies as a server
# @man This is useful after you have run "rudder server disable-policy-distribution"
# @man to allow the agent to restart the policy server.
# @man This will restart the policy server immediately.

. "${BASEDIR}/../lib/common.sh"

if is_https_only; then
  echo "HTTPS-only mode is enabled. This command only handles the CFEngine protocol, doing nothing"
  exit 1
fi

# Enable and start the server right now
systemctl enable rudder-cf-serverd
systemctl start rudder-cf-serverd
