forked from ports/contrib
nut: change pidpath to /run, remove obsolete dependency tcp_wrappers
This commit is contained in:
parent
1036676444
commit
818779ca58
@ -1,6 +1,6 @@
|
|||||||
untrusted comment: verify with /etc/ports/contrib.pub
|
untrusted comment: verify with /etc/ports/contrib.pub
|
||||||
RWSagIOpLGJF30lJ0npy0cpovkfPqPlMevS6BkDwMYTJQFHcfeKhgV4dN2E73HiQgq7UsPPasCXc9B9Eyx4TC7Bslok+Bdl6kwc=
|
RWSagIOpLGJF3/nuZDWNHEnYuQPWlZofrpfzmGXN2Ynosgu59IrhCNW/fUsIF1fl2RPuiVOHdPcRP6Dd2L5SL1InAdpLAIf/sQY=
|
||||||
SHA256 (Pkgfile) = 412628f924f4f22191629b9c9f43155840879f8f99477d8fd696bb4a3dc45e12
|
SHA256 (Pkgfile) = 0d1dc234365e50eccc29b924172d9ca615d5bb921c175de91488a9dbb25e59e9
|
||||||
SHA256 (.footprint) = d81ef8f38c18b2f891e30c523400bd9b5b3abe8e8bfc31b5cb6c0c8013d493ef
|
SHA256 (.footprint) = d81ef8f38c18b2f891e30c523400bd9b5b3abe8e8bfc31b5cb6c0c8013d493ef
|
||||||
SHA256 (nut-2.8.0.tar.gz) = c3e5a708da797b7c70b653d37b1206a000fcb503b85519fe4cdf6353f792bfe5
|
SHA256 (nut-2.8.0.tar.gz) = c3e5a708da797b7c70b653d37b1206a000fcb503b85519fe4cdf6353f792bfe5
|
||||||
SHA256 (upsd) = 3aef2c1ea325ef9b7d799d244a4fd633ec378e963776bf643273c9d6ee83172a
|
SHA256 (upsd) = 3aef2c1ea325ef9b7d799d244a4fd633ec378e963776bf643273c9d6ee83172a
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# Description: Network UPS Tools. Monitor of UPS hardware.
|
# Description: Network UPS Tools. Monitor of UPS hardware.
|
||||||
# URL: http://www.networkupstools.org/
|
# URL: http://www.networkupstools.org/
|
||||||
# Maintainer: Danny Rawlins, crux at romster dot me
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
||||||
# Depends on: libusb openssl tcp_wrappers
|
# Depends on: libusb openssl
|
||||||
|
# Optional: avahi neon nss
|
||||||
|
|
||||||
name=nut
|
name=nut
|
||||||
version=2.8.0
|
version=2.8.0
|
||||||
@ -16,6 +17,7 @@ build() {
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--with-user=nut \
|
--with-user=nut \
|
||||||
--with-group=nut \
|
--with-group=nut \
|
||||||
|
--with-pidpath=/run \
|
||||||
--sysconfdir=/etc/$name \
|
--sysconfdir=/etc/$name \
|
||||||
--datadir=/usr/share/$name \
|
--datadir=/usr/share/$name \
|
||||||
--localstatedir=/var/$name
|
--localstatedir=/var/$name
|
||||||
|
@ -1,42 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Created by Danny Rawlins, monster dot romster at gmail dot com
|
getent group nut || /usr/sbin/groupadd nut
|
||||||
|
getent passwd nut || /usr/sbin/useradd -d /var/empty -g nut \
|
||||||
GROUP=nut
|
-c "Network UPS Tools" -s /bin/sh nut
|
||||||
USER=nut
|
/usr/bin/passwd -l nut
|
||||||
USER_COMMENT="Network UPS Tools"
|
|
||||||
USER_HOME=/var/empty
|
|
||||||
USER_SHELL=/bin/sh
|
|
||||||
|
|
||||||
if [ ! $(id -u) = 0 ]; then
|
|
||||||
echo "ERROR: you need to be root to run this!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $GROUP ]; then
|
|
||||||
if ! getent group $GROUP > /dev/null; then
|
|
||||||
/usr/sbin/groupadd $GROUP
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Group: $GROUP added."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Group: $GROUP already exists! Skipping."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! getent passwd $USER > /dev/null; then
|
|
||||||
/usr/sbin/useradd -g $GROUP -c "$USER_COMMENT" -d $USER_HOME -s $USER_SHELL $USER
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "User: $USER added."
|
|
||||||
/usr/bin/passwd -l $USER > /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Locked: $USER account."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "ERROR: unable to lock $USER account."
|
|
||||||
/usr/sbin/userdel $USER
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "User: $USER already exists! Skipping."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user