2020-09-03 13:46:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-09-03 19:40:25 +00:00
|
|
|
# source our config files
|
2020-09-03 13:46:19 +00:00
|
|
|
for _file in ./config/local/* ; do
|
|
|
|
. "$_file"
|
|
|
|
done
|
|
|
|
|
|
|
|
# check we have ssh access
|
|
|
|
[ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5
|
|
|
|
|
2020-09-03 19:40:25 +00:00
|
|
|
# update local server
|
2020-09-03 13:46:19 +00:00
|
|
|
echo "Updating ..":
|
|
|
|
ssh -T $ssh << EOSSH
|
|
|
|
apt-get update && apt-get upgrade
|
|
|
|
EOSSH
|
|
|
|
echo "Update complete"
|
|
|
|
|
|
|
|
. ./scripts/install-user.sh
|
2020-09-03 19:40:25 +00:00
|
|
|
. ./scripts/install-base.sh
|
|
|
|
|
|
|
|
if [ -n "$php_version" ] ; then
|
|
|
|
. ./scripts/install-php.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$mariadb_version" ] ; then
|
|
|
|
. ./scripts/install-mariadb.sh
|
|
|
|
elif [ -n "$mysql_version" ] ; then
|
|
|
|
. ./scripts/install-mysql.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$apache2_version" ] ; then
|
|
|
|
. ./scripts/install-apache2.sh
|
|
|
|
elif [ -n "$nginx_version" ] ; then
|
|
|
|
# TODO nginx install script
|
|
|
|
echo 'TODO . ./scripts/install-nginx.sh'
|
|
|
|
elif [ -n "$litespeed_version" ] ; then
|
|
|
|
# TODO
|
|
|
|
echo 'TODO . ./scripts/install-litespeed.sh'
|
|
|
|
fi
|
2020-09-03 13:46:19 +00:00
|
|
|
|
|
|
|
# source application script?
|
2020-09-03 19:40:25 +00:00
|
|
|
|
|
|
|
# source dev env script
|