extend force to service restarting

This commit is contained in:
Aaron Bieber 2019-10-21 21:26:55 -06:00
parent 44a7cb6f5a
commit 7ba5d3ccfc
Signed by: qbit
GPG Key ID: 279160AB1BE1236B
3 changed files with 5 additions and 5 deletions

View File

@ -41,8 +41,8 @@ The options are as follows:
**-f** **-f**
> Force installation of all packages. > Force installation of all packages and restarting of all services
> This skips the 'intelligent' diff mode. > This skips the 'intelligent' diff and service restart mode.
**-m** **-m**

View File

@ -73,7 +73,7 @@ SERVICE_START_RESTART=$(cat <<EOF
if /usr/sbin/rcctl check %s; then if /usr/sbin/rcctl check %s; then
AGE=\$(stat -s %s | awk -v now=\$(date +%%s) \ AGE=\$(stat -s %s | awk -v now=\$(date +%%s) \
'{split(\$10,a,"="); print now - a[2]}') '{split(\$10,a,"="); print now - a[2]}')
if [ \$AGE -lt 100 ]; then if [ \$AGE -lt 100 ] || [ "${FORCE}" == "1" ]; then
logger -t boxctl "restarting %s (\$AGE seconds old)" logger -t boxctl "restarting %s (\$AGE seconds old)"
/usr/sbin/rcctl restart %s /usr/sbin/rcctl restart %s
else else

View File

@ -49,8 +49,8 @@ with.
Defaults to Defaults to
.Pa root . .Pa root .
.It Fl f .It Fl f
Force installation of all packages. Force installation of all packages and restarting of all services
This skips the 'intelligent' diff mode. This skips the 'intelligent' diff and service restart mode.
.It Fl m .It Fl m
Run maintenance tasks. Run maintenance tasks.
This includes deleting unused dependencies using This includes deleting unused dependencies using