test: whitespace changes only

Coding style for shell scripts:

  - Tabs for indent (change in Emacs needed)
  - Braces on their own line, like C functions

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-04-02 10:45:30 +02:00
parent 879721839e
commit 6f802a7ff1
14 changed files with 216 additions and 187 deletions
+12 -4
View File
@@ -4,31 +4,38 @@
DAEMON="/test_assets/service.sh"
PIDFILE="/var/run/service.pid"
start() {
start()
{
printf 'Starting %s: ' "$DAEMON"
start-stop-daemon -S -b -q -p "$PIDFILE" -x "$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
stop()
{
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
restart()
{
stop
sleep 1
start
@@ -36,7 +43,8 @@ restart() {
case "$1" in
start|stop|restart)
"$1";;
"$1"
;;
*)
echo "Usage: $0 {start|stop|restart}, got $0 $1"
exit 1
+4 -4
View File
@@ -2,9 +2,9 @@
cleanup()
{
echo "Got signal, stopping ..."
rm -f /run/service.pid
exit 0
echo "Got signal, stopping ..."
rm -f /run/service.pid
exit 0
}
# Hook SIGUSR1 and dump trace to file system
@@ -20,5 +20,5 @@ echo $$ > /run/service.pid
# sleep may exit on known signal, so
# we cannot use 'set -e'
while true; do
sleep 1
sleep 1
done