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 b91084c commit 26c34c7
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 26c34c7

Please sign in to comment.