File: finish-exec

package info (click to toggle)
runit 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,248 kB
  • sloc: ansic: 5,590; sh: 3,690; makefile: 385
file content (35 lines) | stat: -rwxr-xr-x 752 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
set -e

NAME=${PWD##*/}

[ -e /etc/runit/override-sysv.d/"$NAME".pkgrunit ] && rm /etc/runit/override-sysv.d/"$NAME".pkgrunit

case $1 in
(-1)
	echo "invoke-run: ERROR $1 in $NAME: runscript didn't exit normally"
	# no need to sv d service here, runsv will stop trying after the first attempt
	;;

(161)
	echo "invoke-run: WARNING for $NAME: disabled by local settings"
	sv d $NAME
	;;

(162)
	echo "invoke-run: ERROR $1 in $NAME: configtest or early setup failed"
	sv d $NAME
	;;

(170)
	echo "invoke-run: ERROR $1 in $NAME: a runtime hard dependecy is missing"
	sv d $NAME
	;;
esac

if [ -e /etc/runit/verbose ]; then
	echo "invoke-run: $NAME stopped"
fi
if [ -e /etc/runit/debug ] ; then
	echo "invoke-run: $NAME : run exit code is $1"
fi