diff --git a/PKGBUILD b/PKGBUILD index d75a29f..012febd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -24,12 +24,7 @@ package() { install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf install -Dm644 ${pkgname}.nginx "${pkgdir}"/etc/nginx/sites-enabled/${pkgname}.conf - install -dm644 "${pkgdir}"/srv/${pkgname} cd ${pkgname}/${pkgname} find * -type f -exec install -Dm0644 "{}" "${pkgdir}/usr/share/webapps/${pkgname}/{}" \; - - cd "${pkgdir}/usr/share/webapps/${pkgname}" - python manage.py migrate - python manage.py collectstatic } diff --git a/nummi.service b/nummi.service index b8d6f38..6c0dd17 100644 --- a/nummi.service +++ b/nummi.service @@ -8,6 +8,8 @@ User=nummi Group=nummi RuntimeDirectory=nummi WorkingDirectory=/usr/share/webapps/nummi +ExecStartPre=/usr/bin/python manage.py migrate +ExecStartPre=/usr/bin/python manage.py collectstatic ExecStart=/usr/bin/uvicorn nummi.asgi:application --uds /run/nummi/nummi.socket ExecReload=/bin/kill -s HUP $MAINPID KillMode=mixed diff --git a/nummi.tmpfiles b/nummi.tmpfiles index ef1e6bf..8cd104e 100644 --- a/nummi.tmpfiles +++ b/nummi.tmpfiles @@ -1 +1,2 @@ d /var/lib/nummi 0750 nummi nummi +d /srv/nummi 0755 nummi nummi