The mycroft.sh script uses the 'screen' command to run the various
processes that make up Mycroft Core. When they are stopped with
"./mycroft.sh stop", it was using the screen 'quit' command. This
ends the process abruptly, not allowing services to shutdown
cleanly.
This changes it to send a shutdown request first, equivalent of a
Ctrl-C. If the service doesn't shutdown after 2 seconds it is
then killed.
This specifically prevents issues where a skill expected and did
not receive a call to the shutdown() method.
* Improve mycroft.sh
- Refactor to make adding other scripts easier
- Stop all skills before starting
- Handle multiple screen instances running at the same time
- Notify the user by screen name (not as pretty but makes more sense)
- Clean up code:
- Change if chain to switch statement
- use cat to display usage rather than multiple echo statements
* Small mycroft.sh refactor
- Auto-generate .screen files
- Add start-mycroft-custom for other executables
- Use echo instead of cat (originally didn't realize multiline quotes were a thing)
- Rename variable screen_name to uppercase to be consistent
* Decrease mycroft.sh sleep time to 0.1 seconds
Less time to wait and still seems to work fine on all tested platforms
* Added log filtering commands to the CLI. So you can do things within the CLI like:
:filter DEBUG (filters out any lines containing "DEBUG")
:filter remove DEBUG (stop filtering "DEBUG")
:filter "not this" (filters out any log lines containing "not this")
:filter list (displays active filters)
:filter clear (removes all filters)
* Added a ~/.mycroft-cli.conf configuration file. It currently contains the last-used filters.
* The mycroft.sh scripts were firing up the "fancy" CLI in the background and logging it constantly. This resulted in huge log files because of the constantly updated microphone level indicator.
* Noticed that FAQ/Common Errors section of README.md said that mycroft.sh would start the cli, so I added it.
* changed three to four for FAQ since four processes are listed.
* added --quiet option to start.sh cli to prevent echo when using the cli
* per @the7erm sugestion: changed the log flush to 1 second for screen.
* modified mycroft.sh to support starting in three modes:
- service, skills, voice, cli --quiet
- service skills, voice
- service skills, cli
* Added changes to quick start to reflect changes to mycroft.sh
The pull request simply adds a crunch bang to the `mycroft.sh` shell script to prevent the follow error:
Failed to execute process './mycroft.sh'. Reason:
exec: Exec format error
The file './mycroft.sh' is marked as an executable but could not be run by the operating system.