slb

Sleep on Low Battery
Log | Files | Refs | README | LICENSE

commit 0b2c596a50f8e940a02e8dbc901435c8b715a090
parent 4780b669656d9705deb8e115b87f897b9f0bf042
Author: zerous Naveen Narayanan <zerous@nocebo.space>
Date:   Sat,  9 Nov 2019 20:35:05 +0100

Throw error if mksrv is run as non-root

Diffstat:
Mmksrv | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/mksrv b/mksrv @@ -1,5 +1,11 @@ #!/bin/sh +uid=`id -u` +if test $uid -ne 0 +then + echo "This script should be run as root" + exit 1 +fi umask 022 mkdir /etc/sv/slb cat <<EOF >/etc/sv/slb/run