Files
ols-docker-env/bin/appinstall.sh
T

48 lines
907 B
Bash
Raw Normal View History

2019-12-30 14:43:53 -05:00
#!/usr/bin/env bash
APP_NAME=''
DOMAIN=''
help_message(){
echo 'Command [-app app_name] [-domain domain_name]'
2020-01-08 16:49:52 -05:00
echo 'Example: appinstall.sh -app wordpress -d example.com'
2019-12-30 14:43:53 -05:00
}
check_input(){
if [ -z "${1}" ]; then
help_message
exit 1
fi
}
app_download(){
2020-01-08 16:49:52 -05:00
docker-compose exec litespeed su -c "appinstallctl.sh -app ${1} -domain ${2}"
2020-01-15 09:18:25 +01:00
bash bin/webadmin.sh -r
2019-12-30 14:43:53 -05:00
exit 0
}
2020-01-09 16:42:48 -05:00
main(){
app_download ${APP_NAME} ${DOMAIN}
}
check_input ${1}
2019-12-30 14:43:53 -05:00
while [ ! -z "${1}" ]; do
case ${1} in
-[hH] | -help | --help)
help_message
;;
-app | -a | -A) shift
check_input "${1}"
APP_NAME="${1}"
;;
-d | -D | -domain) shift
check_input "${1}"
DOMAIN="${1}"
;;
*)
help_message
;;
esac
shift
done
2020-01-09 16:42:48 -05:00
main