First check in
This commit is contained in:
5
SNAP/README
Normal file
5
SNAP/README
Normal file
@@ -0,0 +1,5 @@
|
||||
This is the directory where the manifest, snapinfo,
|
||||
and files.tar.gz files will be created. It is also
|
||||
where the usher file should be placed if it is
|
||||
required by the package. Any other files that need
|
||||
to be included could also be placed here.
|
||||
44
SNAP/acpid.init
Executable file
44
SNAP/acpid.init
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: acpid
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Should-Start:
|
||||
# Should-Stop
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Advanced Configuration and Power Interface event daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_info_msg "Starting ACPI event daemon"
|
||||
|
||||
pidofproc -p /run/acpid.pid > /dev/null && \
|
||||
echo -n " acpid already running" && log_warning_msg
|
||||
|
||||
start_daemon /usr/sbin/acpid -p /run/acpid.pid && \
|
||||
log_success_msg || log_failure_msg
|
||||
;;
|
||||
stop)
|
||||
log_info_msg "Stopping ACPI event daemon"
|
||||
killproc -p "/run/acpid.pid" /usr/sbin/acpid && \
|
||||
log_success_msg || log_failure_msg
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
statusproc /usr/sbin/acpid
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
2
SNAP/powerbutton
Normal file
2
SNAP/powerbutton
Normal file
@@ -0,0 +1,2 @@
|
||||
event=button/power
|
||||
action=/sbin/shutdown -t1 -a -h now
|
||||
Reference in New Issue
Block a user