blob: dc542a965a689650cdb4cf77e492d52186017b05 (
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/sh
TMPDIR="${TMPDIR:-/tmp}"
function create_chef_txt {
touch $TMPDIR/inittest.txt
}
function delete_chef_txt {
rm $TMPDIR/inittest.txt
}
function rename_chef_txt {
mv $TMPDIR/inittest.txt $TMPDIR/$1
}
case "$1" in
start )
create_chef_txt
;;
stop )
delete_chef_txt
;;
status )
[ -f $TMPDIR/inittest.txt ] || [ -f $TMPDIR/inittest_reload.txt ] || [ -f $TMPDIR/inittest_restart.txt ]
;;
reload )
rename_chef_txt "inittest_reload.txt"
;;
restart )
rename_chef_txt "inittest_restart.txt"
;;
* )
echo "Usage: $0 (start | stop | restart | reload)"
exit 1
esac
|