server_config/install.sh

28 lines
522 B
Bash

# Install requirements
echo "[server_config] > Installing required utilities"
source ./_requirements.sh
# Make sure default owner of config files is root
chown -R root:root .
# Install services
APPS=$@
if [[ $# -eq 1 ]]; then
if [[ $1 == "--all" || $1 == "-a" ]]; then
APPS=$(ls -d */)
fi
fi
BASE=$(pwd)
for app in $APPS
do
cd $BASE
echo "[server_config] > Installing: $app"
source "./$app/_install.sh" \
&& echo "[server_config] > Install done" \
|| echo "[server_config] > Install failed"
done