Make rc.d scripts shellcheck friendly.
This commit is contained in:
parent
9b4ac20589
commit
a3322cb47f
6 changed files with 43 additions and 13 deletions
|
|
@ -4,6 +4,8 @@
|
|||
# Darren 'Tadgy' Austin <darren (at) afterdark.org.uk>
|
||||
# Licensed under the terms of the GNU General Public License version 3.
|
||||
|
||||
# shellcheck disable=SC2016,SC1090
|
||||
|
||||
BWBAR_EXEC="/opt/bin/bwbar"
|
||||
DAEMON_EXEC="/usr/bin/daemon"
|
||||
BWBAR_ARGS=('-f' '/run/bwbar.txt' '-l' '/run/bwbar-light.png' '-d' '/run/bwbar-dark.png' '${MONINTERFACE:-eth0}' '$(( ($(ethtool "${MONINTERFACE:-eth0}" | sed -nre "/Speed:/ s/[^[:digit:]]*([[:digit:]]+).*/\1/ p") / 100) * 90 ))')
|
||||
|
|
@ -52,6 +54,7 @@ startdaemon() {
|
|||
return 2
|
||||
}
|
||||
su - "${RUNUSER:-$(whoami)}" -c "${DAEMON_ENVIRONMENT:+declare ${DAEMON_ENVIRONMENT[*]};} \"$DAEMON_EXEC\" ${DAEMON_ARGS[*]} \"$BWBAR_EXEC\" ${BWBAR_ARGS[*]}"
|
||||
# shellcheck disable=SC2181
|
||||
if (( $? != 0 )); then
|
||||
error "error starting 'daemon'"
|
||||
return 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue