56 lines
1.4 KiB
Bash
Executable File
56 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
### Copyright 1999-2025. WebPros International GmbH. All rights reserved.
|
|
|
|
PN=`basename $0`
|
|
|
|
usage()
|
|
{
|
|
cat <<-EOL
|
|
Usage: $PN [--interactive [--verbose] ] [--fast] <boostrapper repair options>
|
|
|
|
Options:
|
|
-i, --interactive
|
|
run bootstrapper repair in interactive mode, do not supress stdout, stderr
|
|
-f, --fast
|
|
skip some time-consuming repair actions
|
|
-v, --verbose
|
|
verbose output from 'bootstrapper repair'
|
|
-h, --help
|
|
show this help
|
|
EOL
|
|
}
|
|
|
|
#parse options
|
|
TEMP=`getopt -o ifvh --long interactive,fast,verbose,help \
|
|
-n "$PN" -- "$@"`
|
|
|
|
if [ $? != 0 ] ; then echo "Internal error: failed to run getopt" >&2 ; exit 1 ; fi
|
|
eval set -- "$TEMP"
|
|
|
|
opt_interactive=0
|
|
opt_fast=0
|
|
opt_verbose=0
|
|
|
|
while true ; do
|
|
case "$1" in
|
|
-i|--interactive) opt_interactive=1; shift;;
|
|
-f|--fast) opt_fast=1; shift;;
|
|
-v|--verbose) opt_verbose=1; shift;;
|
|
-h|--help) usage; exit 0;;
|
|
--) shift ; break ;;
|
|
*) echo "Internal error!" ; exit 1 ;;
|
|
esac
|
|
done
|
|
|
|
if [ "$opt_fast" -gt 0 ]; then
|
|
export PLESK_INSTALLER_FAST_REPAIR=1
|
|
export PLESK_INSTALLER_SKIP_MCHK=1
|
|
fi
|
|
|
|
if [ "$opt_interactive" -gt 0 ]; then
|
|
[ ! "$opt_verbose" -gt 0 ] || export PLESK_INSTALLER_VERBOSE=1
|
|
/opt/psa/bootstrapper/pp18.0.74-bootstrapper/bootstrapper.sh repair "$@"
|
|
else
|
|
nohup /opt/psa/bootstrapper/pp18.0.74-bootstrapper/bootstrapper.sh repair "$@" >/dev/null 2>&1 &
|
|
fi
|