Add post-install for permission setting

This commit is contained in:
LinuxSquare 2025-05-30 17:33:29 +02:00
parent 18df381e0f
commit b6f391bccf
Signed by: LinuxSquare
SSH key fingerprint: SHA256:vFuUYM2D47SB3YMPF55L8zeJbJwEX89d/I967NgKN0A
2 changed files with 9 additions and 3 deletions

View file

@ -4,7 +4,7 @@ pkgrel=2
pkgdesc="Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools." pkgdesc="Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools."
url="https://semaphoreui.com" url="https://semaphoreui.com"
license="MIT" license="MIT"
install="$pkgname.pre-install $pkgname.pre-upgrade" install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-install"
arch="x86_64" arch="x86_64"
_arch="amd64" _arch="amd64"
source=" source="
@ -22,9 +22,9 @@ prepare() {
package() { package() {
# binaries # binaries
install -d "$pkgdir/usr/bin" install -d "$pkgdir/usr/bin"
install -D -o semaphore -g semaphore -m755 "$srcdir/$pkgname-$pkgver/semaphore" "$pkgdir/usr/bin/semaphore" install -D -m755 "$srcdir/$pkgname-$pkgver/semaphore" "$pkgdir/usr/bin/semaphore"
# config # config
install -o semaphore -g semaphore -dm644 "$pkgdir/etc/semaphore" install -dm644 "$pkgdir/etc/semaphore"
# service files # service files
install -D -m755 "$srcdir/semaphore.initd" "$pkgdir/etc/init.d/semaphore" install -D -m755 "$srcdir/semaphore.initd" "$pkgdir/etc/init.d/semaphore"
} }

View file

@ -0,0 +1,6 @@
#!/bin/sh
chown semaphore:semaphore /usr/bin/semaphore
chown -R semaphore:semaphore /etc/semaphore
exit 0