svc.sh: tidy help file
This commit is contained in:
parent
ed78a854f6
commit
ff811e2f45
126
svc.sh
126
svc.sh
@ -16,6 +16,7 @@
|
|||||||
## WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
## WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
|
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
LRED="\033[1;31m"
|
LRED="\033[1;31m"
|
||||||
BLUE="\033[0;34m"
|
BLUE="\033[0;34m"
|
||||||
@ -30,6 +31,28 @@ LPURPLE="\033[1;35m"
|
|||||||
BWHITE="\e[1m"
|
BWHITE="\e[1m"
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
help(){
|
||||||
|
printf """
|
||||||
|
svc - Service Commander - frontend for the sv command
|
||||||
|
|
||||||
|
Usage: svc link | unlink | linked | list | up | start | restart | stop <service>
|
||||||
|
|
||||||
|
|
||||||
|
For detailed help, see the commands below:
|
||||||
|
|
||||||
|
|
||||||
|
start Start a linked service
|
||||||
|
restart Restart a linked service
|
||||||
|
stop Stop a linked service
|
||||||
|
link Symlink directory/file to /var/service
|
||||||
|
unlink Remove symlink from
|
||||||
|
linked View symlink paths of all services
|
||||||
|
ls List linked and unlinked service files
|
||||||
|
up Show status of running services
|
||||||
|
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
||||||
link | --link-service )
|
link | --link-service )
|
||||||
@ -73,107 +96,6 @@ case $1 in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--help | -h | help )
|
--help | -h | help )
|
||||||
echo
|
help
|
||||||
echo " sc - Service Commander - frontend for the sv command"
|
|
||||||
echo
|
|
||||||
echo " Usage: sc link | unlink | linked | list | up | start | restart | stop <service>"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo " For detailed help, see the commands below:"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo " help-all"
|
|
||||||
echo " help-link"
|
|
||||||
echo " help-unlink"
|
|
||||||
echo " help-linked"
|
|
||||||
echo " help-list"
|
|
||||||
echo " help-up"
|
|
||||||
echo " help-start"
|
|
||||||
echo " help-restart"
|
|
||||||
echo " help-stop"
|
|
||||||
echo
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
help-link )
|
|
||||||
echo
|
|
||||||
echo "link : Creates a symlink from /etc/sv/<name> -> /var/service/<name>"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-unlink )
|
|
||||||
echo
|
|
||||||
echo "unlink : Removes symlink from /etc/sv/<name> -> /var/service/<name>"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-linked )
|
|
||||||
echo
|
|
||||||
echo "linked : Lists all symlinked items in /etc/sv"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-list )
|
|
||||||
echo
|
|
||||||
echo "list : List the contents of /etc/sv and /var/service"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-up )
|
|
||||||
echo
|
|
||||||
echo "up : Lists all currently running services"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-start )
|
|
||||||
echo
|
|
||||||
echo "start : Uses the 'sv' command to start a service"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-restart )
|
|
||||||
echo
|
|
||||||
echo "restart : Uses the 'sv' command to restart a service"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-stop )
|
|
||||||
echo
|
|
||||||
echo "stop : Uses the 'sv' command to stop a service"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
|
|
||||||
help-all )
|
|
||||||
echo
|
|
||||||
echo "link : Creates a symlink from /etc/sv/<name> -> /var/service/<name>"
|
|
||||||
echo "unlink : Removes symlink from /etc/sv/<name> -> /var/service/<name>"
|
|
||||||
echo "linked : Lists all symlinked items in /etc/sv"
|
|
||||||
echo "list : List the contents of /etc/sv and /var/service"
|
|
||||||
echo "up : Lists all currently running services"
|
|
||||||
echo "start : Uses the 'sv' command to start a service"
|
|
||||||
echo "restart : Uses the 'sv' command to restart a service"
|
|
||||||
echo "stop : Uses the 'sv' command to stop a service"
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo
|
|
||||||
echo " svc - Service Commander - frontend for the sv command"
|
|
||||||
echo
|
|
||||||
echo " Usage: svc link | unlink | linked | list | up | start | restart | stop <service>"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo " For detailed help, see the commands below:"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo " help-all"
|
|
||||||
echo " help-link"
|
|
||||||
echo " help-unlink"
|
|
||||||
echo " help-linked"
|
|
||||||
echo " help-list"
|
|
||||||
echo " help-up"
|
|
||||||
echo " help-start"
|
|
||||||
echo " help-restart"
|
|
||||||
echo " help-stop"
|
|
||||||
echo
|
|
||||||
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user