You've already forked biometric-authentication
mirror of
https://github.com/ukui/biometric-authentication.git
synced 2026-03-09 09:25:45 -07:00
7c55280dce
Adapt libfprint-2 library (#4) Co-authored-by: chenziyi <chenziyi@kylinos.cn>
75 lines
1.8 KiB
Bash
75 lines
1.8 KiB
Bash
#!/bin/bash
|
|
#
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: biometric-authentication
|
|
# Required-Start: $local_fs dbus
|
|
# Required-Stop: $local_fs dbus
|
|
# Should-Start: $named
|
|
# Should-Stop: $named
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Biometric Authentication Service
|
|
# Description:
|
|
# The service layer of the biometric identification authentication framework.
|
|
# The service layer uses the DBus bus to provide the upper application with
|
|
# operation interfaces such as feature enroll, feature verify, feature identify,
|
|
# feature search, feature delete, etc. Meanwhile, it also provides notification
|
|
# of device status changes event and notification of USB device hotplug event.
|
|
### END INIT INFO
|
|
|
|
set -e
|
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib/biometric-authentication/
|
|
DAEMON=/usr/lib/biometric-authentication/biometric-authenticationd
|
|
PIDFILE=/tmp/biometric-authentication.pid
|
|
|
|
if [ -r /etc/default/locale ]; then
|
|
. /etc/default/locale
|
|
export LANG LANGUAGE
|
|
fi
|
|
|
|
test -x $DAEMON || exit 0
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
SSD_START_ARGS="--pidfile $PIDFILE --remove-pidfile --background --quiet --exec $DAEMON"
|
|
SSD_STOP_ARGS="--pidfile $PIDFILE"
|
|
|
|
start(){
|
|
log_begin_msg "Starting biometric authentication service"
|
|
start-stop-daemon --start $SSD_START_ARGS
|
|
log_end_msg 0
|
|
}
|
|
|
|
stop(){
|
|
log_daemon_msg "Stopping biometric authentication service"
|
|
start-stop-daemon --stop --quiet $SSD_STOP_ARGS || true
|
|
log_end_msg 0
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
force-reload)
|
|
stop
|
|
start
|
|
;;
|
|
status)
|
|
status_of_proc -p "$PIDFILE" "$DAEMON" "$(basename $DAEMON)"
|
|
;;
|
|
*)
|
|
echo "Usage: /etc/init.d/biometric-authentication {start|stop|restart|status}"
|
|
exit 1
|
|
esac
|
|
|
|
exit 0
|