mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-06 21:42:52 +02:00
Replace manual user/group creation with sysusers.d and tmpfiles.d
This commit is contained in:
@@ -23,11 +23,15 @@ source=(
|
||||
"$pkgname-$pkgver.tar.gz::https://github.com/jkingsman/Remote-Terminal-for-MeshCore/archive/refs/tags/$pkgver.tar.gz"
|
||||
"remoteterm-meshcore.service"
|
||||
"remoteterm.env"
|
||||
"remoteterm-meshcore.sysusers"
|
||||
"remoteterm-meshcore.tmpfiles"
|
||||
)
|
||||
# sha256sums are recomputed by `updpkgsums` in the publish workflow before
|
||||
# the PKGBUILD is pushed to AUR. The committed values are intentionally SKIP
|
||||
# so the file is honest about not tracking real hashes in this repo.
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP')
|
||||
|
||||
@@ -111,6 +115,12 @@ package() {
|
||||
install -Dm640 "$srcdir/remoteterm.env" \
|
||||
"$pkgdir/etc/remoteterm-meshcore/remoteterm.env"
|
||||
|
||||
# System user and data directory
|
||||
install -Dm644 "$srcdir/remoteterm-meshcore.sysusers" \
|
||||
"$pkgdir/usr/lib/sysusers.d/remoteterm-meshcore.conf"
|
||||
install -Dm644 "$srcdir/remoteterm-meshcore.tmpfiles" \
|
||||
"$pkgdir/usr/lib/tmpfiles.d/remoteterm-meshcore.conf"
|
||||
|
||||
# License
|
||||
install -Dm644 LICENSE.md \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
pre_install() {
|
||||
getent group remoteterm > /dev/null || groupadd -r remoteterm
|
||||
getent passwd remoteterm > /dev/null || \
|
||||
useradd -r -g remoteterm -d /var/lib/remoteterm-meshcore -s /sbin/nologin \
|
||||
-c "RemoteTerm for MeshCore" remoteterm
|
||||
}
|
||||
|
||||
pre_upgrade() {
|
||||
pre_install
|
||||
}
|
||||
|
||||
post_install() {
|
||||
echo "==> Set your radio connection (serial, TCP, or BLE) in"
|
||||
echo "==> /etc/remoteterm-meshcore/remoteterm.env"
|
||||
|
||||
1
pkg/aur/remoteterm-meshcore.sysusers
Normal file
1
pkg/aur/remoteterm-meshcore.sysusers
Normal file
@@ -0,0 +1 @@
|
||||
u remoteterm - "RemoteTerm for MeshCore" /var/lib/remoteterm-meshcore
|
||||
1
pkg/aur/remoteterm-meshcore.tmpfiles
Normal file
1
pkg/aur/remoteterm-meshcore.tmpfiles
Normal file
@@ -0,0 +1 @@
|
||||
d /var/lib/remoteterm-meshcore 0750 remoteterm remoteterm
|
||||
Reference in New Issue
Block a user