OpenVoiceOS/buildroot-external/rootfs-overlay/etc/init.d/S90mycroft_prepare

32 lines
574 B
Plaintext
Raw Normal View History

2018-10-26 19:51:01 +02:00
#!/bin/sh
#
# Prepare Mycroft software stack.
#
start() {
# set the right locale / language settings
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
# Check if Mycroft log folders are present and if not
# create those logging folders
if [[ ! -w /var/log/mycroft/ ]] ; then
# Creating needed folders
printf "Creating /var/log/mycroft/ directory"
if [[ ! -d /var/log/mycroft/ ]] ; then
mkdir /var/log/mycroft/
fi
fi
}
case "$1" in
start)
start
;;
*)
echo "Usage: $0 {start}"
exit 1
esac
exit $?