blob: b67abbfa43013734dbd42d2070e6902667c216a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/ksh
TMPDIR="${TMPDIR:-/tmp}"
function create_chef_txt {
touch $TMPDIR/chefinittest.txt
}
function delete_chef_txt {
rm $TMPDIR/chefinittest.txt
}
function rename_chef_txt {
mv $TMPDIR/chefinittest.txt $TMPDIR/$1
}
case "$1" in
start )
create_chef_txt
;;
stop )
delete_chef_txt
;;
status )
[ -f $TMPDIR/chefinittest.txt ] || [ -f $TMPDIR/chefinittest_reload.txt ] || [ -f $TMPDIR/chefinittest_restart.txt ]
;;
reload )
rename_chef_txt "chefinittest_reload.txt"
;;
restart )
rename_chef_txt "chefinittest_restart.txt"
;;
* )
echo "Usage: $0 (start | stop | restart | reload)"
exit 1
esac
|