Dear all,
This is my script in the bash: how can I put it into puppet?
#!/usr/bin/env bash
CONF_DIR="/var/mom_priv"
CPU_COUNT=`cat /proc/cpuinfo | grep siblings | uniq | cut -d\ -f2`
ideal_load_var=$(echo "scale=2; ${CPU_COUNT}+0.5" | bc)
max_load_var=$(echo "scale=2; ${CPU_COUNT}*1.2" | bc)
if [ -d "${CONF_DIR}" ]; then
cat << EOF > ${CONF_DIR}/config
\$ideal_load ${ideal_load_var}
\$max_load ${max_load_var}
EOF
fi
All I wann do is: Get the CPU_COUNT and then if CONF_DIR exists, make sure
"$CONF_DIR/config" is present with the above lines. How should I write that
for puppet? Cheers!!
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/Uyz5hQSJX9AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.