rpcbind: use socket activation for systemd, run daemon as rpc user.

This commit is contained in:
Juan RP 2012-07-09 11:47:41 +02:00
parent 8535c57866
commit b6577ad946
3 changed files with 24 additions and 8 deletions

View file

@ -1,9 +1,12 @@
[Unit]
Description=RPC Bind
Description=RPC bind service
Requires=rpcbind.socket
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/bin/rpcbind
ExecStart=/usr/bin/rpcbind -w
[Install]
WantedBy=multi-user.target
Also=rpcbind.socket

View file

@ -0,0 +1,8 @@
[Unit]
Description=RPCbind Server Activation Socket
[Socket]
ListenStream=/var/run/rpcbind.sock
[Install]
WantedBy=sockets.target

View file

@ -1,14 +1,15 @@
# Template file for 'rpcbind'
pkgname=rpcbind
version=0.2.0
homepage="http://rpcbind.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.bz2"
revision=2
build_style=gnu-configure
configure_args="--enable-warmstarts --with-statedir=/run"
configure_args="--enable-warmstarts --with-statedir=/var/lib/rpcbind
--with-rpcuser=rpc"
makedepends="libtirpc-devel"
revision=1
short_desc="Converts RPC program numbers into universal addresses"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://rpcbind.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.bz2"
checksum=c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3
long_desc="
The rpcbind utility is a server that converts RPC program numbers into
@ -16,10 +17,14 @@ long_desc="
RPC calls on a server on that machine."
systemd_services="${pkgname}.service on"
system_accounts="rpc"
rpc_homedir="/var/lib/rpcbind"
make_dirs="/var/lib/rpcbind 0700 rpc rpc"
post_install() {
vinstall man/rpcbind.8 644 usr/share/man/man8
vinstall man/rpcinfo.8 644 usr/share/man/man8
vinstall ${FILESDIR}/${pkgname}.service 644 lib/systemd/system
vmkdir lib/systemd/system
install -m644 ${FILESDIR}/*.{service,socket} \
${DESTDIR}/lib/systemd/system
}