File: run

package info (click to toggle)
runit-services 0.10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 404 kB
  • sloc: sh: 477; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env /lib/runit/invoke-run
#Copyright: 2019 Cloux <cloux@rote.ch>
#             2023  Lorenzo Puliti <plorenzo@disroot.org>
#License: CC0-1.0

exec 2>&1

if ! ##bin## -t -q -c /etc/nginx/nginx.conf -g 'daemon off;' ; then
    echo "${PWD##*/}: config test failed"
    sv d "${PWD##*/}"
fi

# nginx only provides a config file option to run in the foreground:
exec ##bin## -c /etc/nginx/nginx.conf -g 'daemon off;'