Fix permission issues

This commit is contained in:
Edgar P. Burkhart 2022-05-21 18:08:06 +02:00
parent ab35d774dc
commit 1e378f6306
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 3 additions and 5 deletions

View file

@ -24,12 +24,7 @@ package() {
install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf 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}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
install -Dm644 ${pkgname}.nginx "${pkgdir}"/etc/nginx/sites-enabled/${pkgname}.conf install -Dm644 ${pkgname}.nginx "${pkgdir}"/etc/nginx/sites-enabled/${pkgname}.conf
install -dm644 "${pkgdir}"/srv/${pkgname}
cd ${pkgname}/${pkgname} cd ${pkgname}/${pkgname}
find * -type f -exec install -Dm0644 "{}" "${pkgdir}/usr/share/webapps/${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
} }

View file

@ -8,6 +8,8 @@ User=nummi
Group=nummi Group=nummi
RuntimeDirectory=nummi RuntimeDirectory=nummi
WorkingDirectory=/usr/share/webapps/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 ExecStart=/usr/bin/uvicorn nummi.asgi:application --uds /run/nummi/nummi.socket
ExecReload=/bin/kill -s HUP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID
KillMode=mixed KillMode=mixed

View file

@ -1 +1,2 @@
d /var/lib/nummi 0750 nummi nummi d /var/lib/nummi 0750 nummi nummi
d /srv/nummi 0755 nummi nummi