microwave 11.400.5 → 11.400.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/chef/daemon.rb +0 -2
- metadata +3 -118
- data/distro/README +0 -2
- data/distro/arch/etc/conf.d/chef-client.conf +0 -5
- data/distro/arch/etc/conf.d/chef-expander.conf +0 -8
- data/distro/arch/etc/conf.d/chef-server-webui.conf +0 -10
- data/distro/arch/etc/conf.d/chef-server.conf +0 -10
- data/distro/arch/etc/conf.d/chef-solr.conf +0 -8
- data/distro/arch/etc/rc.d/chef-client +0 -90
- data/distro/arch/etc/rc.d/chef-expander +0 -78
- data/distro/arch/etc/rc.d/chef-server +0 -78
- data/distro/arch/etc/rc.d/chef-server-webui +0 -78
- data/distro/arch/etc/rc.d/chef-solr +0 -78
- data/distro/common/html/chef-client.8.html +0 -145
- data/distro/common/html/chef-expander.8.html +0 -164
- data/distro/common/html/chef-expanderctl.8.html +0 -146
- data/distro/common/html/chef-server-webui.8.html +0 -185
- data/distro/common/html/chef-server.8.html +0 -182
- data/distro/common/html/chef-shell.1.html +0 -286
- data/distro/common/html/chef-solo.8.html +0 -191
- data/distro/common/html/chef-solr.8.html +0 -165
- data/distro/common/html/knife-bootstrap.1.html +0 -241
- data/distro/common/html/knife-client.1.html +0 -219
- data/distro/common/html/knife-configure.1.html +0 -170
- data/distro/common/html/knife-cookbook-site.1.html +0 -241
- data/distro/common/html/knife-cookbook.1.html +0 -384
- data/distro/common/html/knife-data-bag.1.html +0 -238
- data/distro/common/html/knife-environment.1.html +0 -267
- data/distro/common/html/knife-exec.1.html +0 -134
- data/distro/common/html/knife-index.1.html +0 -125
- data/distro/common/html/knife-node.1.html +0 -250
- data/distro/common/html/knife-role.1.html +0 -200
- data/distro/common/html/knife-search.1.html +0 -288
- data/distro/common/html/knife-ssh.1.html +0 -156
- data/distro/common/html/knife-status.1.html +0 -128
- data/distro/common/html/knife-tag.1.html +0 -137
- data/distro/common/html/knife.1.html +0 -315
- data/distro/common/man/man1/chef-shell.1 +0 -220
- data/distro/common/man/man1/knife-bootstrap.1 +0 -201
- data/distro/common/man/man1/knife-client.1 +0 -99
- data/distro/common/man/man1/knife-configure.1 +0 -88
- data/distro/common/man/man1/knife-cookbook-site.1 +0 -145
- data/distro/common/man/man1/knife-cookbook.1 +0 -345
- data/distro/common/man/man1/knife-data-bag.1 +0 -136
- data/distro/common/man/man1/knife-environment.1 +0 -178
- data/distro/common/man/man1/knife-exec.1 +0 -43
- data/distro/common/man/man1/knife-index.1 +0 -29
- data/distro/common/man/man1/knife-node.1 +0 -134
- data/distro/common/man/man1/knife-role.1 +0 -88
- data/distro/common/man/man1/knife-search.1 +0 -280
- data/distro/common/man/man1/knife-ssh.1 +0 -79
- data/distro/common/man/man1/knife-status.1 +0 -29
- data/distro/common/man/man1/knife-tag.1 +0 -43
- data/distro/common/man/man1/knife.1 +0 -285
- data/distro/common/man/man8/chef-client.8 +0 -104
- data/distro/common/man/man8/chef-expander.8 +0 -97
- data/distro/common/man/man8/chef-expanderctl.8 +0 -62
- data/distro/common/man/man8/chef-server-webui.8 +0 -155
- data/distro/common/man/man8/chef-server.8 +0 -147
- data/distro/common/man/man8/chef-solo.8 +0 -158
- data/distro/common/man/man8/chef-solr.8 +0 -122
- data/distro/common/markdown/README +0 -3
- data/distro/common/markdown/man1/chef-shell.mkd +0 -195
- data/distro/common/markdown/man1/knife-bootstrap.mkd +0 -141
- data/distro/common/markdown/man1/knife-client.mkd +0 -103
- data/distro/common/markdown/man1/knife-configure.mkd +0 -70
- data/distro/common/markdown/man1/knife-cookbook-site.mkd +0 -123
- data/distro/common/markdown/man1/knife-cookbook.mkd +0 -263
- data/distro/common/markdown/man1/knife-data-bag.mkd +0 -121
- data/distro/common/markdown/man1/knife-environment.mkd +0 -151
- data/distro/common/markdown/man1/knife-exec.mkd +0 -42
- data/distro/common/markdown/man1/knife-index.mkd +0 -30
- data/distro/common/markdown/man1/knife-node.mkd +0 -130
- data/distro/common/markdown/man1/knife-role.mkd +0 -85
- data/distro/common/markdown/man1/knife-search.mkd +0 -180
- data/distro/common/markdown/man1/knife-ssh.mkd +0 -69
- data/distro/common/markdown/man1/knife-status.mkd +0 -36
- data/distro/common/markdown/man1/knife-tag.mkd +0 -39
- data/distro/common/markdown/man1/knife.mkd +0 -213
- data/distro/common/markdown/man8/chef-client.mkd +0 -74
- data/distro/common/markdown/man8/chef-expander.mkd +0 -82
- data/distro/common/markdown/man8/chef-expanderctl.mkd +0 -58
- data/distro/common/markdown/man8/chef-server-webui.mkd +0 -121
- data/distro/common/markdown/man8/chef-server.mkd +0 -121
- data/distro/common/markdown/man8/chef-solo.mkd +0 -107
- data/distro/common/markdown/man8/chef-solr.mkd +0 -89
- data/distro/debian/etc/default/chef-client +0 -4
- data/distro/debian/etc/default/chef-expander +0 -8
- data/distro/debian/etc/default/chef-server +0 -9
- data/distro/debian/etc/default/chef-server-webui +0 -9
- data/distro/debian/etc/default/chef-solr +0 -8
- data/distro/debian/etc/init.d/chef-client +0 -210
- data/distro/debian/etc/init.d/chef-expander +0 -176
- data/distro/debian/etc/init.d/chef-server +0 -122
- data/distro/debian/etc/init.d/chef-server-webui +0 -123
- data/distro/debian/etc/init.d/chef-solr +0 -176
- data/distro/debian/etc/init/chef-client.conf +0 -17
- data/distro/debian/etc/init/chef-expander.conf +0 -17
- data/distro/debian/etc/init/chef-server-webui.conf +0 -17
- data/distro/debian/etc/init/chef-server.conf +0 -17
- data/distro/debian/etc/init/chef-solr.conf +0 -17
- data/distro/redhat/etc/init.d/chef-client +0 -121
- data/distro/redhat/etc/init.d/chef-expander +0 -104
- data/distro/redhat/etc/init.d/chef-server +0 -112
- data/distro/redhat/etc/init.d/chef-server-webui +0 -112
- data/distro/redhat/etc/init.d/chef-solr +0 -104
- data/distro/redhat/etc/logrotate.d/chef-client +0 -8
- data/distro/redhat/etc/logrotate.d/chef-expander +0 -8
- data/distro/redhat/etc/logrotate.d/chef-server +0 -8
- data/distro/redhat/etc/logrotate.d/chef-server-webui +0 -8
- data/distro/redhat/etc/logrotate.d/chef-solr +0 -8
- data/distro/redhat/etc/sysconfig/chef-client +0 -15
- data/distro/redhat/etc/sysconfig/chef-expander +0 -7
- data/distro/redhat/etc/sysconfig/chef-server +0 -14
- data/distro/redhat/etc/sysconfig/chef-server-webui +0 -14
- data/distro/redhat/etc/sysconfig/chef-solr +0 -8
- data/distro/windows/service_manager.rb +0 -164
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
11.400.
|
1
|
+
11.400.6
|
data/lib/chef/daemon.rb
CHANGED
@@ -121,8 +121,6 @@ class Chef
|
|
121
121
|
# Change process user/group to those specified in Chef::Config
|
122
122
|
#
|
123
123
|
def change_privilege
|
124
|
-
Dir.chdir("/")
|
125
|
-
|
126
124
|
if Chef::Config[:user] and Chef::Config[:group]
|
127
125
|
Chef::Log.info("About to change privilege to #{Chef::Config[:user]}:#{Chef::Config[:group]}")
|
128
126
|
_change_privilege(Chef::Config[:user], Chef::Config[:group])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microwave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1547
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 11
|
8
8
|
- 400
|
9
|
-
-
|
10
|
-
version: 11.400.
|
9
|
+
- 6
|
10
|
+
version: 11.400.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Jacob
|
@@ -376,121 +376,6 @@ files:
|
|
376
376
|
- README.md
|
377
377
|
- CONTRIBUTING.md
|
378
378
|
- VERSION
|
379
|
-
- distro/arch/etc/conf.d/chef-client.conf
|
380
|
-
- distro/arch/etc/conf.d/chef-expander.conf
|
381
|
-
- distro/arch/etc/conf.d/chef-server-webui.conf
|
382
|
-
- distro/arch/etc/conf.d/chef-server.conf
|
383
|
-
- distro/arch/etc/conf.d/chef-solr.conf
|
384
|
-
- distro/arch/etc/rc.d/chef-client
|
385
|
-
- distro/arch/etc/rc.d/chef-expander
|
386
|
-
- distro/arch/etc/rc.d/chef-server
|
387
|
-
- distro/arch/etc/rc.d/chef-server-webui
|
388
|
-
- distro/arch/etc/rc.d/chef-solr
|
389
|
-
- distro/common/html/chef-client.8.html
|
390
|
-
- distro/common/html/chef-expander.8.html
|
391
|
-
- distro/common/html/chef-expanderctl.8.html
|
392
|
-
- distro/common/html/chef-server-webui.8.html
|
393
|
-
- distro/common/html/chef-server.8.html
|
394
|
-
- distro/common/html/chef-shell.1.html
|
395
|
-
- distro/common/html/chef-solo.8.html
|
396
|
-
- distro/common/html/chef-solr.8.html
|
397
|
-
- distro/common/html/knife-bootstrap.1.html
|
398
|
-
- distro/common/html/knife-client.1.html
|
399
|
-
- distro/common/html/knife-configure.1.html
|
400
|
-
- distro/common/html/knife-cookbook-site.1.html
|
401
|
-
- distro/common/html/knife-cookbook.1.html
|
402
|
-
- distro/common/html/knife-data-bag.1.html
|
403
|
-
- distro/common/html/knife-environment.1.html
|
404
|
-
- distro/common/html/knife-exec.1.html
|
405
|
-
- distro/common/html/knife-index.1.html
|
406
|
-
- distro/common/html/knife-node.1.html
|
407
|
-
- distro/common/html/knife-role.1.html
|
408
|
-
- distro/common/html/knife-search.1.html
|
409
|
-
- distro/common/html/knife-ssh.1.html
|
410
|
-
- distro/common/html/knife-status.1.html
|
411
|
-
- distro/common/html/knife-tag.1.html
|
412
|
-
- distro/common/html/knife.1.html
|
413
|
-
- distro/common/man/man1/chef-shell.1
|
414
|
-
- distro/common/man/man1/knife-bootstrap.1
|
415
|
-
- distro/common/man/man1/knife-client.1
|
416
|
-
- distro/common/man/man1/knife-configure.1
|
417
|
-
- distro/common/man/man1/knife-cookbook-site.1
|
418
|
-
- distro/common/man/man1/knife-cookbook.1
|
419
|
-
- distro/common/man/man1/knife-data-bag.1
|
420
|
-
- distro/common/man/man1/knife-environment.1
|
421
|
-
- distro/common/man/man1/knife-exec.1
|
422
|
-
- distro/common/man/man1/knife-index.1
|
423
|
-
- distro/common/man/man1/knife-node.1
|
424
|
-
- distro/common/man/man1/knife-role.1
|
425
|
-
- distro/common/man/man1/knife-search.1
|
426
|
-
- distro/common/man/man1/knife-ssh.1
|
427
|
-
- distro/common/man/man1/knife-status.1
|
428
|
-
- distro/common/man/man1/knife-tag.1
|
429
|
-
- distro/common/man/man1/knife.1
|
430
|
-
- distro/common/man/man8/chef-client.8
|
431
|
-
- distro/common/man/man8/chef-expander.8
|
432
|
-
- distro/common/man/man8/chef-expanderctl.8
|
433
|
-
- distro/common/man/man8/chef-server-webui.8
|
434
|
-
- distro/common/man/man8/chef-server.8
|
435
|
-
- distro/common/man/man8/chef-solo.8
|
436
|
-
- distro/common/man/man8/chef-solr.8
|
437
|
-
- distro/common/markdown/man1/chef-shell.mkd
|
438
|
-
- distro/common/markdown/man1/knife-bootstrap.mkd
|
439
|
-
- distro/common/markdown/man1/knife-client.mkd
|
440
|
-
- distro/common/markdown/man1/knife-configure.mkd
|
441
|
-
- distro/common/markdown/man1/knife-cookbook-site.mkd
|
442
|
-
- distro/common/markdown/man1/knife-cookbook.mkd
|
443
|
-
- distro/common/markdown/man1/knife-data-bag.mkd
|
444
|
-
- distro/common/markdown/man1/knife-environment.mkd
|
445
|
-
- distro/common/markdown/man1/knife-exec.mkd
|
446
|
-
- distro/common/markdown/man1/knife-index.mkd
|
447
|
-
- distro/common/markdown/man1/knife-node.mkd
|
448
|
-
- distro/common/markdown/man1/knife-role.mkd
|
449
|
-
- distro/common/markdown/man1/knife-search.mkd
|
450
|
-
- distro/common/markdown/man1/knife-ssh.mkd
|
451
|
-
- distro/common/markdown/man1/knife-status.mkd
|
452
|
-
- distro/common/markdown/man1/knife-tag.mkd
|
453
|
-
- distro/common/markdown/man1/knife.mkd
|
454
|
-
- distro/common/markdown/man8/chef-client.mkd
|
455
|
-
- distro/common/markdown/man8/chef-expander.mkd
|
456
|
-
- distro/common/markdown/man8/chef-expanderctl.mkd
|
457
|
-
- distro/common/markdown/man8/chef-server-webui.mkd
|
458
|
-
- distro/common/markdown/man8/chef-server.mkd
|
459
|
-
- distro/common/markdown/man8/chef-solo.mkd
|
460
|
-
- distro/common/markdown/man8/chef-solr.mkd
|
461
|
-
- distro/common/markdown/README
|
462
|
-
- distro/debian/etc/default/chef-client
|
463
|
-
- distro/debian/etc/default/chef-expander
|
464
|
-
- distro/debian/etc/default/chef-server
|
465
|
-
- distro/debian/etc/default/chef-server-webui
|
466
|
-
- distro/debian/etc/default/chef-solr
|
467
|
-
- distro/debian/etc/init/chef-client.conf
|
468
|
-
- distro/debian/etc/init/chef-expander.conf
|
469
|
-
- distro/debian/etc/init/chef-server-webui.conf
|
470
|
-
- distro/debian/etc/init/chef-server.conf
|
471
|
-
- distro/debian/etc/init/chef-solr.conf
|
472
|
-
- distro/debian/etc/init.d/chef-client
|
473
|
-
- distro/debian/etc/init.d/chef-expander
|
474
|
-
- distro/debian/etc/init.d/chef-server
|
475
|
-
- distro/debian/etc/init.d/chef-server-webui
|
476
|
-
- distro/debian/etc/init.d/chef-solr
|
477
|
-
- distro/README
|
478
|
-
- distro/redhat/etc/init.d/chef-client
|
479
|
-
- distro/redhat/etc/init.d/chef-expander
|
480
|
-
- distro/redhat/etc/init.d/chef-server
|
481
|
-
- distro/redhat/etc/init.d/chef-server-webui
|
482
|
-
- distro/redhat/etc/init.d/chef-solr
|
483
|
-
- distro/redhat/etc/logrotate.d/chef-client
|
484
|
-
- distro/redhat/etc/logrotate.d/chef-expander
|
485
|
-
- distro/redhat/etc/logrotate.d/chef-server
|
486
|
-
- distro/redhat/etc/logrotate.d/chef-server-webui
|
487
|
-
- distro/redhat/etc/logrotate.d/chef-solr
|
488
|
-
- distro/redhat/etc/sysconfig/chef-client
|
489
|
-
- distro/redhat/etc/sysconfig/chef-expander
|
490
|
-
- distro/redhat/etc/sysconfig/chef-server
|
491
|
-
- distro/redhat/etc/sysconfig/chef-server-webui
|
492
|
-
- distro/redhat/etc/sysconfig/chef-solr
|
493
|
-
- distro/windows/service_manager.rb
|
494
379
|
- lib/chef/api_client/registration.rb
|
495
380
|
- lib/chef/api_client.rb
|
496
381
|
- lib/chef/application/agent.rb
|
data/distro/README
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
LOGFILE=/var/log/chef/server-webui.log
|
2
|
-
CONFIG=/etc/chef/webui.rb
|
3
|
-
ADAPTER=thin
|
4
|
-
PORT=4040
|
5
|
-
USER=chef
|
6
|
-
GROUP=chef
|
7
|
-
# Sleep to give daemon enough time to fully start or stop.
|
8
|
-
STARTTIME=10
|
9
|
-
DIETIME=5
|
10
|
-
CHEF_SERVER_WEBUI_ARGS="-p $PORT -e production -d -a $ADAPTER -L $LOGFILE -C $CONFIG -u $USER -G $GROUP"
|
@@ -1,10 +0,0 @@
|
|
1
|
-
LOGFILE=/var/log/chef/server.log
|
2
|
-
CONFIG=/etc/chef/server.rb
|
3
|
-
ADAPTER=thin
|
4
|
-
PORT=4000
|
5
|
-
USER=chef
|
6
|
-
GROUP=chef
|
7
|
-
# Sleep to give daemon enough time to fully start or stop.
|
8
|
-
STARTTIME=10
|
9
|
-
DIETIME=5
|
10
|
-
CHEF_SERVER_ARGS="-p $PORT -e production -d -a $ADAPTER -L $LOGFILE -C $CONFIG -u $USER -G $GROUP"
|
@@ -1,90 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#
|
3
|
-
# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com>
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
#
|
17
|
-
|
18
|
-
daemon_bin="/usr/bin/chef-client"
|
19
|
-
daemon_name=$(basename $daemon_bin)
|
20
|
-
PIDF="/var/run/$daemon_name.pid"
|
21
|
-
|
22
|
-
. /etc/rc.conf
|
23
|
-
. /etc/rc.d/functions
|
24
|
-
. /etc/conf.d/$daemon_name.conf
|
25
|
-
|
26
|
-
get_pid() {
|
27
|
-
pidof -o %PPID $daemon_name
|
28
|
-
}
|
29
|
-
|
30
|
-
case "$1" in
|
31
|
-
start)
|
32
|
-
stat_busy "Starting $daemon_name"
|
33
|
-
PID=$(get_pid)
|
34
|
-
if [ -z "$PID" ]; then
|
35
|
-
[ -f $PIDF ] && rm -f $PIDF
|
36
|
-
$daemon_bin --pid $PIDF $CHEF_CLIENT_ARGS
|
37
|
-
if [ $? -gt 0 ]; then
|
38
|
-
stat_fail
|
39
|
-
exit 1
|
40
|
-
else
|
41
|
-
echo $(get_pid) > $PIDF
|
42
|
-
add_daemon $daemon_name
|
43
|
-
stat_done
|
44
|
-
fi
|
45
|
-
else
|
46
|
-
stat_fail
|
47
|
-
exit 1
|
48
|
-
fi
|
49
|
-
;;
|
50
|
-
|
51
|
-
stop)
|
52
|
-
stat_busy "Stopping $daemon_name daemon"
|
53
|
-
PID=$(get_pid)
|
54
|
-
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
55
|
-
if [ $? -gt 0 ]; then
|
56
|
-
stat_fail
|
57
|
-
exit 1
|
58
|
-
else
|
59
|
-
rm -f $PIDF &>/dev/null
|
60
|
-
rm_daemon $daemon_name
|
61
|
-
stat_done
|
62
|
-
fi
|
63
|
-
;;
|
64
|
-
|
65
|
-
restart)
|
66
|
-
$0 stop
|
67
|
-
sleep 3
|
68
|
-
$0 start
|
69
|
-
;;
|
70
|
-
|
71
|
-
status)
|
72
|
-
stat_busy "Checking $daemon_name status";
|
73
|
-
ck_status $daemon_name
|
74
|
-
;;
|
75
|
-
|
76
|
-
run)
|
77
|
-
stat_busy "Triggering new run of $daemon_name daemon"
|
78
|
-
PID=$(get_pid)
|
79
|
-
[ ! -z "$PID" ] && kill -SIGUSR1 $PID &> /dev/null
|
80
|
-
if [ $? -gt 0 ]; then
|
81
|
-
stat_fail
|
82
|
-
exit 1
|
83
|
-
else
|
84
|
-
stat_done
|
85
|
-
fi
|
86
|
-
;;
|
87
|
-
|
88
|
-
*)
|
89
|
-
echo "usage: $) {start|stop|restart|status|run}"
|
90
|
-
esac
|
@@ -1,78 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#
|
3
|
-
# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com>
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
#
|
17
|
-
|
18
|
-
daemon_bin="/usr/bin/chef-expander"
|
19
|
-
daemon_name=$(basename $daemon_bin)
|
20
|
-
PIDF="/var/run/$daemon_name.pid"
|
21
|
-
|
22
|
-
. /etc/rc.conf
|
23
|
-
. /etc/rc.d/functions
|
24
|
-
. /etc/conf.d/$daemon_name.conf
|
25
|
-
|
26
|
-
get_pid() {
|
27
|
-
pidof -o %PPID $daemon_name
|
28
|
-
}
|
29
|
-
|
30
|
-
case "$1" in
|
31
|
-
start)
|
32
|
-
stat_busy "Starting $daemon_name"
|
33
|
-
PID=$(get_pid)
|
34
|
-
if [ -z "$PID" ]; then
|
35
|
-
[ -f $PIDF ] && rm -f $PIDF
|
36
|
-
$daemon_bin -P $PIDF $CHEF_EXPANDER_ARGS
|
37
|
-
[ -n "$STARTTIME" ] && sleep $STARTTIME
|
38
|
-
if [ $? -gt 0 ]; then
|
39
|
-
stat_fail
|
40
|
-
exit 1
|
41
|
-
else
|
42
|
-
echo $(get_pid) > $PIDF
|
43
|
-
add_daemon $daemon_name
|
44
|
-
stat_done
|
45
|
-
fi
|
46
|
-
else
|
47
|
-
stat_fail
|
48
|
-
exit 1
|
49
|
-
fi
|
50
|
-
;;
|
51
|
-
|
52
|
-
stop)
|
53
|
-
stat_busy "Stopping $daemon_name daemon"
|
54
|
-
PID=$(get_pid)
|
55
|
-
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
56
|
-
if [ $? -gt 0 ]; then
|
57
|
-
stat_fail
|
58
|
-
exit 1
|
59
|
-
else
|
60
|
-
rm -f $PIDF &>/dev/null
|
61
|
-
rm_daemon $daemon_name
|
62
|
-
stat_done
|
63
|
-
fi
|
64
|
-
;;
|
65
|
-
|
66
|
-
restart)
|
67
|
-
$0 stop
|
68
|
-
[ -n "$DIETIME" ] && sleep $DIETIME
|
69
|
-
$0 start
|
70
|
-
[ -n "$STARTTIME" ] && sleep $STARTTIME
|
71
|
-
;;
|
72
|
-
status)
|
73
|
-
stat_busy "Checking $daemon_name status";
|
74
|
-
ck_status $daemon_name
|
75
|
-
;;
|
76
|
-
*)
|
77
|
-
echo "usage: $) {start|stop|restart|status}"
|
78
|
-
esac
|
@@ -1,78 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#
|
3
|
-
# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com>
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
#
|
17
|
-
|
18
|
-
daemon_bin="/usr/bin/chef-server"
|
19
|
-
daemon_name=$(basename $daemon_bin)
|
20
|
-
PIDF="/var/run/$daemon_name.pid"
|
21
|
-
|
22
|
-
. /etc/rc.conf
|
23
|
-
. /etc/rc.d/functions
|
24
|
-
. /etc/conf.d/$daemon_name.conf
|
25
|
-
|
26
|
-
get_pid() {
|
27
|
-
pidof -o %PPID $daemon_name
|
28
|
-
}
|
29
|
-
|
30
|
-
case "$1" in
|
31
|
-
start)
|
32
|
-
stat_busy "Starting $daemon_name"
|
33
|
-
PID=$(get_pid)
|
34
|
-
if [ -z "$PID" ]; then
|
35
|
-
[ -f $PIDF ] && rm -f $PIDF
|
36
|
-
$daemon_bin -P $PIDF $CHEF_SERVER_ARGS
|
37
|
-
[ -n "$STARTTIME" ] && sleep $STARTTIME
|
38
|
-
if [ $? -gt 0 ]; then
|
39
|
-
stat_fail
|
40
|
-
exit 1
|
41
|
-
else
|
42
|
-
echo $(get_pid) > $PIDF
|
43
|
-
add_daemon $daemon_name
|
44
|
-
stat_done
|
45
|
-
fi
|
46
|
-
else
|
47
|
-
stat_fail
|
48
|
-
exit 1
|
49
|
-
fi
|
50
|
-
;;
|
51
|
-
|
52
|
-
stop)
|
53
|
-
stat_busy "Stopping $daemon_name daemon"
|
54
|
-
PID=$(get_pid)
|
55
|
-
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
56
|
-
if [ $? -gt 0 ]; then
|
57
|
-
stat_fail
|
58
|
-
exit 1
|
59
|
-
else
|
60
|
-
rm -f $PIDF &>/dev/null
|
61
|
-
rm_daemon $daemon_name
|
62
|
-
stat_done
|
63
|
-
fi
|
64
|
-
;;
|
65
|
-
|
66
|
-
restart)
|
67
|
-
$0 stop
|
68
|
-
[ -n "$DIETIME" ] && sleep $DIETIME
|
69
|
-
$0 start
|
70
|
-
[ -n "$STARTTIME" ] && sleep $STARTTIME
|
71
|
-
;;
|
72
|
-
status)
|
73
|
-
stat_busy "Checking $daemon_name status";
|
74
|
-
ck_status $daemon_name
|
75
|
-
;;
|
76
|
-
*)
|
77
|
-
echo "usage: $) {start|stop|restart|status}"
|
78
|
-
esac
|