| 1 | #!/bin/bash |
| 2 | |
| 3 | mkdir -p /usr/share/mercuryms |
| 4 | groupadd mercuryms |
| 5 | useradd -g mercuryms -d /usr/share/mercuryms -s $(which nologin) mercuryms |
| 6 | chown mercuryms:mercuryms /usr/share/mercuryms |
| 7 | chmod 700 /usr/share/mercuryms |
| 8 | sqlite3 /usr/share/mercuryms/mercuryms.sqlite "$(cat migrations/*)" |
| 9 | chown mercuryms:mercuryms /usr/share/mercuryms/mercuryms.sqlite |
| 10 | python3 -m venv mercuryms . \ |
| 11 | && source bin/activate \ |
| 12 | && bin/pip install -r requirements.txt \ |
| 13 | && deactivate |
| 14 | cp mercuryms.service /etc/systemd/system/ |
| 15 | cp mercuryms-listen* /etc/systemd/system/ |
| 16 | cp mercuryms-send* /etc/systemd/system/ |