python-faraday.service 331 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
[Unit]
Description=python-faraday Server
Requires=postgresql.service
After=postgresql.service

[Service]
Type=simple
ExecStartPre=/bin/sh -c 'if ! su postgres -c "psql -lqt" | cut -d \| -f 1 | grep -qw faraday; then cd /usr/share/python-faraday && python manage.py initdb; fi'
ExecStart=/usr/share/python-faraday/faraday-server.py