1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-21 08:42:23 +00:00
freebsd-ports/x11/lightdm/files/lightdm.in
Ben Woods 25ea7cceab x11/lightdm: Improve rc script to use daemon(8)
This fixes an issue noticed when sysutils/bsdstats was installed and
enabled at runtime in /etc/rc.conf, but for whatever reason was failing
to send the updated statistics. Upon failing, the lightdm process would
receive a SIGHUP, causing it to stop seconds after the login screen was
displayed (before the user even had a chance to login).
2017-02-12 16:36:59 +00:00

31 lines
556 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: lightdm
# REQUIRE: LOGIN cleanvar moused syscons dbus
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable the LightDM:
#
# lightdm_enable="YES"
#
. /etc/rc.subr
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
name="lightdm"
rcvar=lightdm_enable
load_rc_config ${name}
: ${lightdm_enable:="NO"}
command="/usr/sbin/daemon"
procname="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
command_args="-f ${procname} --pid-file=${pidfile}"
run_rc_command "$1"