]> git.pld-linux.org Git - projects/rc-scripts.git/blame - lib/makepid
Clean and recreate systemd tmpfiles (even if not using systemd).
[projects/rc-scripts.git] / lib / makepid
CommitLineData
d64dc336
ER
1#!/bin/sh
2test -n "$PIDFILE" || { echo >&2 'Missing $PIDFILE env'; exit 1; }
3
4# run the program, and capture pid
5prog="$1"; shift
6"$prog" "$@" &
7pid=$!
8rc=$?
9
10# write pid to file
11echo "$pid" > "$PIDFILE"
12exit $rc
This page took 0.168026 seconds and 4 git commands to generate.