Skip to content

Commit

Permalink
Merge pull request #21 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.3.1
  • Loading branch information
nilsver authored Jun 13, 2024
2 parents 3cee43d + 2e22b77 commit 6bd4d0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1
20 changes: 4 additions & 16 deletions resources/bin/rb_wakeup_chef.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ source /etc/init.d/functions
source /etc/profile

function usage() {
echo "$0 [ -l ] [ -c ] [ -s <service_name> ] [ -i ] [ -n <nodename> ]"
echo "$0 [ -l ] [ -s <service_name> ] [ -i ] [ -n <nodename> ]"
echo " * -l -> show logs after the wakeup"
echo " * -c -> wakeup full cluster"
#echo " * -i -> wakeup sensor nodes"
#echo " * -n <nodename> -> wakeup sensor/manager node name"
echo " * -s <service> -> wakeup manager with this service name enabled"
Expand Down Expand Up @@ -39,30 +38,19 @@ function wakeup_node_service() {
fi
}

wmanagers=0
showlogs=0
service=""

while getopts "hcs:l" name
while getopts "hs:l" name
do
case $name in
h) usage;;
c) wmanagers=1;;
l) showlogs=1;;
s) service="$OPTARG";;
*) usage;;
esac
done

if [ $wmanagers -eq 1 ]; then
if [ "x$service" == "x" ]; then
/usr/bin/serf query -timeout=250ms -no-ack wakeup-chef &>/dev/null
else
# TODO
wakeup_node_service $service &>/dev/null #Only wakeup in local node if the service exists
fi
else
wakeup
fi
wakeup

if [ $showlogs -eq 1 ]; then
echo "Showing chef-client logs on $(hostname): "
Expand Down

0 comments on commit 6bd4d0c

Please sign in to comment.