Add python venv init steps
authorJacob Casper <dev@jacobcasper.com>
Sun, 5 Apr 2020 19:00:05 +0000 (14:00 -0500)
committerJacob Casper <dev@jacobcasper.com>
Sun, 5 Apr 2020 19:00:05 +0000 (14:00 -0500)
README.md
setup.sh

index 9ae27a2..2aae787 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@ This tool provides a way to text images to a Twilio webhook and store them on a
 
 - systemd
 - sqlite3
 
 - systemd
 - sqlite3
+- python (3.7+ is all that's tested)
 
 ## Usage
 
 
 ## Usage
 
index a950de8..89f9be0 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -7,6 +7,10 @@ chown mercuryms:mercuryms /usr/share/mercuryms
 chmod 700 /usr/share/mercuryms
 sqlite3 /usr/share/mercuryms/mercuryms.sqlite "$(cat migrations/*)"
 chown mercuryms:mercuryms /usr/share/mercuryms/mercuryms.sqlite
 chmod 700 /usr/share/mercuryms
 sqlite3 /usr/share/mercuryms/mercuryms.sqlite "$(cat migrations/*)"
 chown mercuryms:mercuryms /usr/share/mercuryms/mercuryms.sqlite
+python3 -m venv mercuryms . \
+  && source bin/activate \
+  && bin/pip install -r requirements.txt \
+  && deactivate
 cp mercuryms.service /etc/systemd/system/
 cp mercuryms-listen* /etc/systemd/system/
 cp mercuryms-send* /etc/systemd/system/
 cp mercuryms.service /etc/systemd/system/
 cp mercuryms-listen* /etc/systemd/system/
 cp mercuryms-send* /etc/systemd/system/