Liunx scripts added linux beep service

This commit is contained in:
2024-08-13 23:39:15 +02:00
parent a09dea9bc1
commit d3bac3f71e

View File

@@ -0,0 +1,37 @@
#! /bin/sh -e
### BEGIN INIT INFO
# Provides: beep
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: beep
# Description:
#
### END INIT INFO
###Install
# install beep
# Put content of this file to /etc/init.d/beep
# chmod a+x /etc/init.d/beep
##Enable
#update-rc.d beep defaults 01
##Disabled
# update-rc.d beep remove
###Src:https://mike632t.wordpress.com/2014/03/11/beep-on-startup-and-shutdown/
# Carry out specific functions (start, stop, restart etc)
case "$1" in
start)
beep -l 75 -f 500 -n -l 75 -f 1000 -n -l 75 -f 2000 -n -l 75 -f 3000
;;
stop)
beep -l 75 -f 3000 -n -l 75 -f 2000 -n -l 75 -f 1000 -n -l 75 -f 500
;;
*)
echo "Usage: /etc/init.d/beep {start|stop}"
exit 1
;;
esac
exit 0