|
|
|
|
@ -3,17 +3,21 @@
|
|
|
|
|
# copy this to ~/.bash_aliases if you don't want to use qnadmin to start and stop QnetGateway
|
|
|
|
|
|
|
|
|
|
function start () {
|
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
|
if [ $# == 1 ]; then
|
|
|
|
|
sudo make installbase && sudo make install${1} && sudo journalctl -u qn${1} -f
|
|
|
|
|
elif [ $# == 2 ]; then
|
|
|
|
|
sudo make installbase && sudo make install${1} && sudo journalctl -u qn${2} -f
|
|
|
|
|
else
|
|
|
|
|
echo "usage: start module_name"
|
|
|
|
|
echo "Usage: start module_name [watch_module]"
|
|
|
|
|
echo "Installs the base system and the module_name prefixed with 'qn' and tails the log."
|
|
|
|
|
echo "Use this alias on for systems with a single defined module."
|
|
|
|
|
echo "Use watch_module if you want to tail a different log"
|
|
|
|
|
echo "Only use this alias for systems with a single defined module."
|
|
|
|
|
echo "You must be in the QnetGateway build directory"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function stop () {
|
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
|
if [ $# == 1 ]; then
|
|
|
|
|
sudo make uninstallbase && sudo make uninstall${1}
|
|
|
|
|
else
|
|
|
|
|
echo "usage: stop module_name"
|
|
|
|
|
@ -23,7 +27,7 @@ function stop () {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function watch () {
|
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
|
if [ $# == 1 ]; then
|
|
|
|
|
sudo journalctl -u qn${1} -f
|
|
|
|
|
else
|
|
|
|
|
echo "usage: watch service_name"
|
|
|
|
|
|