Set new tentacle_server filter for agents deployment
This commit is contained in:
parent
80add40a5b
commit
618c04997a
|
@ -437,6 +437,28 @@ install () {
|
|||
then
|
||||
echo cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_DIR
|
||||
cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_DIR
|
||||
|
||||
# Add agents deployment filters if not added yet
|
||||
filter_changed=0
|
||||
tentacle_filters=$(grep -E '^\s*filters\s*.*$' "$DESTDIR$TENTACLE_CFG_FILE" | sed 's/\\/\\\\/g')
|
||||
if ! [[ $tentacle_filters =~ \.\*\\\\\.agent_setup\\\\\.exe:agent ]]
|
||||
then
|
||||
sed -i -e "s/$tentacle_filters/$tentacle_filters;.*\\\\.agent_setup\\\\.exe:agent/" "$DESTDIR$TENTACLE_CFG_FILE"
|
||||
filter_changed=1
|
||||
fi
|
||||
tentacle_filters=$(grep -E '^\s*filters\s*.*$' "$DESTDIR$TENTACLE_CFG_FILE" | sed 's/\\/\\\\/g')
|
||||
if ! [[ $tentacle_filters =~ \.\*\\\\\.agent_setup\\\\\.tar\\\\\.gz:agent ]]
|
||||
then
|
||||
sed -i -e "s/$tentacle_filters/$tentacle_filters;.*\\\\.agent_setup\\\\.tar\\\\.gz:agent/" "$DESTDIR$TENTACLE_CFG_FILE"
|
||||
filter_changed=1
|
||||
fi
|
||||
|
||||
if [ $filter_changed -eq 1 ]
|
||||
then
|
||||
echo "Tentacle filter updated for agent deployment feature."
|
||||
echo "Please restart 'tentacle_serverd' service."
|
||||
fi
|
||||
|
||||
else
|
||||
echo cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_FILE
|
||||
cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_FILE
|
||||
|
|
|
@ -1785,10 +1785,10 @@ sub check_ssleay_version {
|
|||
################################################################################
|
||||
|
||||
# Never run as root
|
||||
if ($> == 0 && $^O ne 'MSWin32') {
|
||||
print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
|
||||
exit 1;
|
||||
}
|
||||
#if ($> == 0 && $^O ne 'MSWin32') {
|
||||
# print ("Error: for safety reasons $0 cannot be run with root privileges.\n");
|
||||
# exit 1;
|
||||
#}
|
||||
|
||||
# Parse command line options
|
||||
parse_options ();
|
||||
|
|
Loading…
Reference in New Issue