-
Notifications
You must be signed in to change notification settings - Fork 0
/
srvctl-man.sh
79 lines (60 loc) · 1.14 KB
/
srvctl-man.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
install_bin=$(realpath "$BASH_SOURCE")
install_dir=${install_bin:0:-14}
onHS=true
onVE=true
isUSER=true
isROOT=true
LXC_SERVER=true
## we use the format srvctl or sc command argument [plus-argument]
## command
CMD=''
## argument
ARG=''
## optional single argument
OPA=''
## all arguments
ARGS=''
## Current start directory
## Taken from LabLib ONLY for the manual
green='\e[32m'
red='\e[31m'
blue='\e[34m'
yellow='\e[33m'
xxxx='\e[33m'
NC='\e[0m' # No Color
function title {
if [ ! -z "$1" ]
then
echo ''
printf ${green}"%-40s"${NC} "$1"
echo ''
echo ''
fi
}
function hint {
if [ ! -z "$1" ]
then
## print formatted hint
printf ${green}"%-40s"${NC} " $1"
printf ${yellow}"%-48s"${NC} "$2"
## newline
echo ''
fi
}
function man {
printf ${xxxx}"%-40s"${NC} " $1"
echo ''
echo ''
}
function msg {
echo '' > /dev/null
}
source $install_dir/libs/commonlib.sh
title "srvctl COMMAND [arguments]"
title "COMMAND"
load_commands
title "CMS"
load_cms
title "Fedora srvctl by Istvan Kiraly - LaKing@D250.hu - D250 Laboratories - 2015"
exit