im dumb
This commit is contained in:
+8
-5
@@ -9,32 +9,35 @@ fi
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
echo "Attempting to install dependancies"
|
||||
apt install python3-flask sqlite3 libhunspell-dev python3-hunspell uwsgi-core uwsgi-plugin-python3 python3-requests curl
|
||||
apt install python3-flask sqlite3 libhunspell-dev python3-hunspell uwsgi-core uwsgi-plugin-python3 python3-requests python3-dotenv curl
|
||||
|
||||
echo "Creating new user kjv with no login shell"
|
||||
useradd -r -s /bin/false kjv
|
||||
|
||||
echo "Copying server files to /opt/kjv-api"
|
||||
echo "Creating destination directory: /opt/kjv-api"
|
||||
mkdir /opt/kjv-api
|
||||
cp -r "${script_dir}"/. /opt/kjv-api
|
||||
|
||||
echo "Copying server files to /opt/kjv-api"
|
||||
cp -r "${script_dir}"/. /opt/kjv-api
|
||||
|
||||
echo "Setting ownership to kjv user"
|
||||
chmod -R kjv:kjv /opt/kjv-api
|
||||
|
||||
echo "Installing systemd service task"
|
||||
cp /opt/kjv-api/install/kjv-api.service /etc/systemd/system/kjv-api.service
|
||||
cp "/opt/kjv-api/install/kjv-api.service" "/etc/systemd/system/kjv-api.service"
|
||||
|
||||
echo "Enabling auto-start and starting kjv-api"
|
||||
systemctl enable kjv-api.service
|
||||
systemctl start kjv-api.service
|
||||
|
||||
echo "Waiting for the service to initialize"
|
||||
sleep 5
|
||||
|
||||
echo "If you see a random Bible verse below in json format, your installation was successful:"
|
||||
curl -XGET 127.0.0.1:1611/random
|
||||
|
||||
echo "You must now set your webserver as a reverse proxy for your domain and point it to 127.0.0.1:1611"
|
||||
echo "See the `install` folder for example configuration files."
|
||||
echo "See the install folder for example configuration files."
|
||||
echo
|
||||
echo "Notes:"
|
||||
echo " - Thank you for running this software to bring the Bible to people."
|
||||
|
||||
Reference in New Issue
Block a user