Opened 8 months ago

Closed 7 months ago

#29071 closed defect (fixed)

shellcheck: nagios-check-tor-authority-cert issues

Reported by: rl1987 Owned by: rl1987
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt
Cc: Actual Points:
Parent ID: Points:
Reviewer: asn Sponsor:

Description

In nagios-check-tor-authority-cert line 52:
TMPFILE="`tempfile`"
         ^-- SC2006: Use $(..) instead of legacy `..`.
          ^-- SC2186: tempfile is deprecated. Use mktemp instead.


In nagios-check-tor-authority-cert line 57:
	if [ "$?" = 0 ]; then
             ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In nagios-check-tor-authority-cert line 77:
elif [ "$(( $now + 7*24*60*60 ))" -ge "$expiryunix" ]; then
            ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In nagios-check-tor-authority-cert line 80:
elif [ "$(( $now + 30*24*60*60 ))" -ge "$expiryunix" ]; then
            ^-- SC2004: $/${} is unnecessary on arithmetic variables.

Child Tickets

Change History (6)

comment:1 Changed 8 months ago by rl1987

Owner: set to rl1987
Status: newaccepted

comment:2 Changed 8 months ago by rl1987

Status: acceptedneeds_review

https://github.com/torproject/tor/pull/683

Do we still use this script anywhere?

comment:3 Changed 8 months ago by nickm

Milestone: Tor: 0.4.1.x-final

I'll ask the directory authority operators: some of them may use it.

comment:4 Changed 7 months ago by dgoulet

Reviewer: asn

comment:5 Changed 7 months ago by asn

Status: needs_reviewmerge_ready

LGTM!

comment:6 Changed 7 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged to master (which is now 0.4.1)

Note: See TracTickets for help on using tickets.