From 0ad75c471bbd73c8ea62ec1274b488c0b65e4bcb Mon Sep 17 00:00:00 2001 From: Sangbum Kim Date: Sun, 24 Sep 2017 23:34:23 +0900 Subject: [PATCH] =?UTF-8?q?air=5Fmonitor=20=EB=A1=9C=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=20=EB=B0=94=EA=BF=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PKGBUILD | 10 +++++----- air.service => air_monitor.service | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) rename air.service => air_monitor.service (69%) 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