Sunday, May 5, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 915  / 3 Years ago, tue, june 15, 2021, 1:33:19

Every time I want t use this software I have to type /etc/init.d/kerio-kvc {start|stop|restart} in terminal. How can I define a shortcut command in terminal to do that?


More From » gnome-terminal

 Answers
2

Although the above works, you will need to write 3 aliases.



Instead I suggest you use a function (assuming sudo is needed)



function kerio ()
{
case "$1" in
start) sudo /etc/init.d/kerio-kvc start ;;
stop) sudo /etc/init.d/kerio-kvc stop ;;
restart) sudo /etc/init.d/kerio-kvc restart ;;
*) echo 'usage kerio {start|stop|restart}' ;;
esac
}

[#28001] Tuesday, June 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
urvedcaly

Total Points: 171
Total Questions: 118
Total Answers: 124

Location: Cape Verde
Member since Fri, Nov 27, 2020
4 Years ago
;