Ticket #16177: elogind

File elogind, 1.5 KB (added by Joe Locash, 5 years ago)

Updated elogind init script

Line 
1#!/bin/sh
2########################################################################
3# Begin elogind
4#
5# Description : Start elogind daemon
6#
7# Author : Joe Locash - jlocash@gmail.com
8#
9# Version : BLFS 11.0
10#
11########################################################################
12
13### BEGIN INIT INFO
14# Provides: elogind
15# Required-Start: dbus
16# Should-Start:
17# Required-Stop: dbus
18# Should-Stop:
19# Default-Start: 2 3 4 5
20# Default-Stop: 0 1 6
21# Short-Description: Starts elogind.
22# Description: Starts elogind.
23# X-LFS-Provided-By: BLFS
24### END INIT INFO
25
26. /lib/lsb/init-functions
27
28#$LastChangedBy$
29#$Date$
30
31pidfile=/run/elogind.pid
32
33case "$1" in
34 start)
35 log_info_msg "Starting Elogind..."
36 /usr/lib/elogind/elogind --daemon
37 evaluate_retval
38 ;;
39 stop)
40 log_info_msg "Stopping Elogind..."
41 killproc /usr/lib/elogind/elogind
42 evaluate_retval
43 ;;
44 reload)
45 log_info_msg "Reloading Elogind..."
46 killproc /usr/lib/elogind/elogind -HUP
47 evaluate_retval
48 ;;
49 restart)
50 log_info_msg "Restarting Elogind..."
51 # Send elogind SIGINT so seats and sessions are left in place.
52 killproc /usr/lib/elogind/elogind -INT
53 sleep .5
54 /usr/lib/elogind/elogind --daemon
55 evaluate_retval
56 ;;
57 status)
58 statusproc /usr/lib/elogind/elogind
59 ;;
60 *)
61 echo "Usage: $0 {start|stop|reload|restart|status}"
62 exit 1
63 ;;
64esac
65
66# End /etc/init.d/elogind