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) committed Mar 14, 2021
1 parent 86e5369 commit 4f9c7e0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/restart_network.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/sh

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

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

Expand Down

0 comments on commit 4f9c7e0

Please sign in to comment.