diff --git a/PKGBUILD b/PKGBUILD index 7ed6cf6..32a277c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -12,7 +12,7 @@ replaces=('air') options=('!buildflags') depends=('python') makedepends=('python' 'git') -source=('git+https://amuz.es/src/infra/air.git') +source=('$pkgname:git+https://amuz.es/src/infra/air.git') md5sums=('SKIP') @@ -26,13 +26,13 @@ pkgver() { } package() { - mkdir -p "${pkgdir}/opt/air" + mkdir -p "${pkgdir}/opt/${air_monitor}" cd "srcdir/${pkgname}" - git archive master | tar -x -C "$pkgdir/opt/air" - cd "${pkgdir}/opt/air" + git archive master | tar -x -C "$pkgdir/opt/${pkgname}" + cd "${pkgdir}/opt/${pkgname}" python -m venv --clear --symlinks venv "${pkgdir}/opt/air/bin/pip" install -r requirements.txt - install -Dm0644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/${pkgname}/air.service" + install -Dm0644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/${pkgname}/${pkgname}.service" } \ No newline at end of file diff --git a/air.service b/air_monitor.service similarity index 69% rename from air.service rename to air_monitor.service index 1542bed..2c58cdb 100644 --- a/air.service +++ b/air_monitor.service @@ -3,8 +3,8 @@ Description=Air monitering Service After=syslog.target [Service] -WorkingDirectory=/opt/air -ExecStart=/opt/air/venv/bin/python run.py +WorkingDirectory=/opt/air_monitor +ExecStart=/opt/air_monitor/venv/bin/python run.py TimeoutStartSec=5 User=nobody Group=nobody @@ -16,8 +16,8 @@ NotifyAccess=all PrivateDevices=yes PrivateTmp=yes ProtectSystem=full -ReadWriteDirectories=/opt/air -#ProtectHome=yes +ReadWriteDirectories=/opt/air_monitor +ProtectHome=yes NoNewPrivileges=yes