~m-grant-prg/dnsmasq-logrotate/bionic

« back to all changes in this revision

Viewing changes to src/prg/bash/dnsmasq-postrotate.sh.in

  • Committer: Mark Grant
  • Date: 2020-12-21 14:47:38 UTC
  • mfrom: (42.1.1 bionic-trunk)
  • Revision ID: m.grant.prg@gmail.com-20201221144738-iwzhlawnv2nn26ow
MergeĀ fromĀ bionic-trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
#                               Replace #! env bash with absolute path  #
104
104
#                               via configure.                          #
105
105
# 10/08/2019    MG      1.0.7   Correct getopt CL for proper quoting.   #
 
106
# 11/10/2019    MG      1.0.8   Move script_exit() before it is used.   #
106
107
#                                                                       #
107
108
#########################################################################
108
109
 
110
111
# Script-wide variables #
111
112
#########################
112
113
readonly outputprefix="$(basename $0):"
113
 
readonly version=1.0.7                          # script version
 
114
readonly version=1.0.8                          # script version
114
115
readonly packageversion=@pkgversion@            # package version
115
116
 
116
117
readonly logrotatefile="@sysconfdir@/logrotate.d/dnsmasq"
170
171
        fi
171
172
}
172
173
 
 
174
# Standard function to tidy up and return exit code.
 
175
# Parameters -  $1 is the exit code.
 
176
# No return value.
 
177
script_exit()
 
178
{
 
179
        exit $1
 
180
}
 
181
 
173
182
# Standard function to test command error and exit if non-zero.
174
183
# Parameters -  $1 is the exit code, (normally $? from the preceeding command).
175
184
# No return value.
180
189
        fi
181
190
}
182
191
 
183
 
# Standard function to tidy up and return exit code.
184
 
# Parameters -  $1 is the exit code.
185
 
# No return value.
186
 
script_exit()
187
 
{
188
 
        exit $1
189
 
}
190
 
 
191
192
# Standard trap exit function.
192
193
# No parameters.
193
194
# No return value.