You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/uptimed/files/uptimed.init-r1

19 lines
730 B

#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="uptimed - a daemon to record uptime records"
pidfile="/run/uptimed.pid"
command="/usr/sbin/uptimed"
command_user="uptimed"
# The uptimed daemon can create its own PID file, but it doesn't know
# how to drop privileges. On the other hand, if we run it as a
# restricted user under start-stop-daemon, the PID file it creates
# will therefore be owned by a non-root user, and that poses a
# security risk. To avoid the issue entirely, we run the daemon in the
# foreground, and then use command_background=true to let OpenRC
# handle the PID file.
command_args="-f"
command_background="true"