Only run apt install command once.
This commit is contained in:
14
run.sh
14
run.sh
@@ -79,25 +79,29 @@ if [[ $LOGNAME != "root" ]]; then
|
||||
fi
|
||||
|
||||
log "Check if any system dependencies need installed."
|
||||
progs=""
|
||||
if [[ ! `which php` ]]; then
|
||||
echo "- Installing PHP"
|
||||
$sudo apt-get install -y php-cli
|
||||
progs="$progs php-cli"
|
||||
fi
|
||||
if [[ ! `which node` ]]; then
|
||||
echo "- Installing Node"
|
||||
$sudo apt-get install -y nodejs
|
||||
progs="$progs nodejs"
|
||||
fi
|
||||
if [[ ! `which npm` ]]; then
|
||||
echo "- Installing NPM"
|
||||
$sudo apt-get install -y npm
|
||||
progs="$progs npm"
|
||||
fi
|
||||
if [[ ! `which curl` ]]; then
|
||||
echo "- Installing Curl"
|
||||
$sudo apt-get install -y curl
|
||||
progs="$progs curl"
|
||||
fi
|
||||
if [[ ! `which ps` ]]; then
|
||||
echo "- Installing PS"
|
||||
$sudo apt-get install -y procps
|
||||
progs="$progs procps"
|
||||
fi
|
||||
if [[ -n "$progs" ]]; then
|
||||
$sudo apt-get install -y $progs
|
||||
fi
|
||||
|
||||
# Directories and allowed page types are executable, others are not.
|
||||
|
Reference in New Issue
Block a user