2020-06-25 10:27:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ -z "$1" ] ; then
|
|
|
|
echo "error: must specify configuration file to use"
|
|
|
|
exit 5
|
|
|
|
fi
|
|
|
|
|
|
|
|
. ./"$1"
|
|
|
|
|
2020-09-08 17:59:02 +00:00
|
|
|
# check we have ssh access
|
|
|
|
[ -z "$ssh_root" ] && echo "Error: no root ssh configuration specified" && exit 5
|
|
|
|
|
|
|
|
ssh -T $ssh_root << EOSSH
|
2020-06-25 10:27:14 +00:00
|
|
|
|
|
|
|
ufw allow http && ufw allow https
|
|
|
|
|
|
|
|
if [ "$litespeed_version" != 'latest' ] ; then
|
|
|
|
echo "TODO install specific litespeed version"
|
|
|
|
echo ""
|
|
|
|
echo "Specify \"litespeed_version='latest'\" to install current version."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -n "$wp_user" ] ; then
|
|
|
|
wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ols1clk.sh \
|
|
|
|
--adminpassword "$ls_webadmin_pass" \
|
|
|
|
--lsphp "$ls_lsphp_version" \
|
|
|
|
--wordpressplus "$url" \
|
|
|
|
--wordpresspath "$wp_path" \
|
|
|
|
--dbrootpassword "$db_root_pass" \
|
2020-09-08 17:24:06 +00:00
|
|
|
--dbpassword "$db_pass" \
|
|
|
|
--dbname "$db_name" \
|
|
|
|
--dbuser "$db_user" \
|
2020-06-25 10:27:14 +00:00
|
|
|
--wpuser "$wp_user" \
|
|
|
|
--wppassword "$wp_pass" \
|
|
|
|
&& ufw allow 7080
|
|
|
|
else
|
|
|
|
echo "TODO install litespeed without WordPress"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
EOSSH
|