structured scripts
This commit is contained in:
6
bin/_boot/audio_boot_notification
Executable file
6
bin/_boot/audio_boot_notification
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
/home/pi/bin/say_in_english "Hello, raspberry pi `hostname` is booting" || true
|
||||
/home/pi/bin/say_in_english "IP is `hostname -I`" || true
|
||||
|
||||
exit 0
|
||||
14
bin/_boot/notify_boot.sh
Executable file
14
bin/_boot/notify_boot.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
_IP=$(hostname -I) || true
|
||||
_NAME=$(hostname) || true
|
||||
_TMP=/tmp/Text.notify_boot.tmp
|
||||
|
||||
echo From: djocebot@gmail.com > $_TMP
|
||||
echo To: jocelyn.fiat@gmail.com >> $_TMP
|
||||
echo Subject: $_NAME ip=$_IP >> $_TMP
|
||||
echo rpi ip=$_IP >> $_TMP
|
||||
echo . >> $_TMP
|
||||
|
||||
curl -s -n --ssl-reqd --mail-from djocebot@gmail.com --mail-rcpt jocelyn.fiat@gmail.com --url smtps://smtp.gmail.com:465 -T $_TMP -u "djocebot@gmail.com:DjocBOT31"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
_IP=$(hostname -I) || true
|
||||
_NAME=$(hostname) || true
|
||||
_TMP=/tmp/Text.notify_boot.tmp
|
||||
|
||||
echo From: djocebot@gmail.com > $_TMP
|
||||
echo To: jocelyn.fiat@gmail.com >> $_TMP
|
||||
echo Subject: $_NAME ip=$_IP >> $_TMP
|
||||
echo rpi ip=$_IP >> $_TMP
|
||||
echo . >> $_TMP
|
||||
|
||||
curl -s -n --ssl-reqd --mail-from djocebot@gmail.com --mail-rcpt jocelyn.fiat@gmail.com --url smtps://smtp.gmail.com:465 -T $_TMP -u "djocebot@gmail.com:DjocBOT31"
|
||||
|
||||
1
bin/notify_boot.sh
Symbolic link
1
bin/notify_boot.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
_boot/notify_boot.sh
|
||||
13
bin/on_boot
Executable file
13
bin/on_boot
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
/home/pi/bin/_boot/notify_boot.sh || true
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
echo Boot tests
|
||||
else
|
||||
/home/pi/bin/_boot/nas.sh || true
|
||||
fi
|
||||
|
||||
/home/pi/bin/_boot/audio_boot_notication || true
|
||||
|
||||
exit 0
|
||||
3
bin/say_in_english
Executable file
3
bin/say_in_english
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=en&q=$*"; }
|
||||
say $*
|
||||
4
bin/say_in_french
Executable file
4
bin/say_in_french
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=fr&q=$*"; }
|
||||
#say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=en&q=$*"; }
|
||||
say $*
|
||||
Reference in New Issue
Block a user