extend force to service restarting
This commit is contained in:
parent
44a7cb6f5a
commit
7ba5d3ccfc
@ -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**
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user