-
Notifications
You must be signed in to change notification settings - Fork 356
/
status.sh
32 lines (31 loc) · 1.51 KB
/
status.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
other_status(){
status_init
if [[ -e ${ssPath} ]] && [[ -e ${pluginPath} ]] && [[ -e ${webPath} ]]; then
if [[ -n ${ssPid} ]] && [[ -n ${pluginPid} ]] && [[ -n ${webPid} ]]; then
echo -e "\n${Info} ${ssName} (pid ${ssPid}) is already running."
echo -e "${Info} ${pluginName} (pid ${pluginPid}) is already running."
echo -e "${Info} ${webName} (pid ${webPid}) is already running.\n"
else
echo -e "\n${Point} ${ssName} is already installed but not running."
echo -e "${Point} ${pluginName} is already installed but not running."
echo -e "${Point} ${webName} is already installed but not running.\n"
fi
elif [[ -e ${ssPath} ]] && [[ -e ${pluginPath} ]]; then
if [[ -n ${ssPid} ]] && [[ -n ${pluginPid} ]]; then
echo -e "\n${Info} ${ssName} (pid ${ssPid}) is already running."
echo -e "${Info} ${pluginName} (pid ${pluginPid}) is already running.\n"
else
echo -e "\n${Point} ${ssName} is already installed but not running."
echo -e "${Point} ${pluginName} is already installed but not running.\n"
fi
elif [[ -e ${ssPath} ]]; then
if [[ -n ${ssPid} ]]; then
echo -e "\n${Info} ${ssName} (pid ${ssPid}) is already running.\n"
else
echo -e "\n${Point} ${ssName} is already installed but not running.\n"
fi
else
echo -e "\n${Error} Shadowsocks and related plugins are not installed.\n"
exit 1
fi
}