dev-scripts/old/server-install-litespeed.sh

42 lines
1015 B
Bash
Executable File

#!/bin/sh
if [ -z "$1" ] ; then
echo "error: must specify configuration file to use"
exit 5
fi
. ./"$1"
# check we have ssh access
[ -z "$ssh_root" ] && echo "Error: no root ssh configuration specified" && exit 5
ssh -T $ssh_root << EOSSH
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" \
--dbpassword "$db_pass" \
--dbname "$db_name" \
--dbuser "$db_user" \
--wpuser "$wp_user" \
--wppassword "$wp_pass" \
&& ufw allow 7080
else
echo "TODO install litespeed without WordPress"
exit 1
fi
EOSSH