Skip to content

Commit

Permalink
scripts: posixify / remove bashisms
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter G. (nephros) authored and nephros committed Apr 26, 2022
1 parent c61c88e commit 4c4410c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/restart_network.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/sh

function warning {
echo "`basename $0`: Warning: ${@:1}" 1>&2;
warning() {
printf "%s: Warning: %s\n" "$(basename $0)" "$*" 1>&2
}

function service_do {
if systemctl $1 $2; then
service_do() {
if systemctl "$1" "$2"; then
return 0;
else
warning "Status $?" "on $1 $2" ${@:3}
warning "Status $? on" "${@}"
return 1;
fi
}
Expand Down

0 comments on commit 4c4410c

Please sign in to comment.