mirror of
https://github.com/troglobit/finit.git
synced 2026-10-23 11:44:37 +00:00
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:
1 parent
879721839e
commit
6f802a7ff1
14 files changed
+216
-187
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user