Skip to content

Commit

Permalink
Remove bashisms (thanks to Arthur Maciel)
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-goulart committed Oct 13, 2012
1 parent 1e33360 commit 876375c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions debian
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ do_start() {
echo "$NAME is already running."
else
rm -f $PIDFILE
$AWFUL $AWFUL_ARGS &> /var/log/awful/init.log &
$AWFUL $AWFUL_ARGS 2>&1 > /var/log/awful/init.log &
local pid=$!
local exit_code=$?
if [ "$exit_code" == "0" ]; then
if [ "$exit_code" = "0" ]; then
echo $pid > $PIDFILE
return 0
else
Expand All @@ -81,7 +81,7 @@ do_stop() {
local cmd=`echo $AWFUL$AWFUL_ARGS | sed "s/ //g"`
local killed=

if [ "$cmd" == "$cmdline" ]; then
if [ "$cmd" = "$cmdline" ]; then
kill $pid
for i in `seq 1 5`; do
if pidofproc -p "$PIDFILE" >/dev/null; then
Expand All @@ -94,7 +94,7 @@ do_stop() {
fi
done

if [ $killed == "1" ]; then
if [ $killed = "1" ]; then
rm -f $PIDFILE
return 0
else
Expand Down

0 comments on commit 876375c

Please sign in to comment.