shinit

basic init daemon in POSIX sh
git clone git://git.ckyln.com/~cem/shinit.git
Log | Files | Refs | README | LICENSE

commit 0fa554bb37efa23713707861b47c3e6e758b434d
parent 1927bc62666cd1c3dd62bd81acb4beb926855f93
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 13 May 2020 01:06:58 +0300

add poweroff script

Diffstat:
MMakefile | 8++++++--
Apoweroff | 4++++
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,7 +2,11 @@ PREFIX = /usr/local BINDIR = ${PREFIX}/bin install: - install -Dm755 -t ${DESTDIR}${BINDIR} shinit + install -Dm755 shinit ${DESTDIR}${BINDIR}/shinit + install -Dm755 poweroff ${DESTDIR}${BINDIR}/poweroff + ln -sf poweroff ${DESTDIR}${BINDIR}/reboot uninstall: - rm -f ${DESTDIR}${BINDIR}/shinit + rm -f ${DESTDIR}${BINDIR}/shinit \ + ${DESTDIR}${BINDIR}/poweroff \ + ${DESTDIR}${BINDIR}/reboot diff --git a/poweroff b/poweroff @@ -0,0 +1,4 @@ +#!/bin/sh +# An example way to poweroff/reboot. + +case "${0##*/}" in poweroff) kill -s USR1 1 ;; reboot) kill -s INT 1 ; esac