Skip to content

Commit

Permalink
fixing, testing and upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
moff4 committed Oct 7, 2019
1 parent 082025a commit ad0395e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions hell
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ NC='\033[0m'

mkdir -p ${HELL_DIR}

# TESTED

help() {
echo -e " ${Green}Hell${NC} - utility to controll ${Red}daemons${NC}"
echo " $ $0 [-h|-?|--help|-v]"
echo " $ $0 <service_name> [ start | stop | restart | reload | status ]"
echo " $ $0 [ start | stop | restart | reload | status ] <service_name>"
echo " $ $0 <service_name> [ [ add | update ] [ -d=<dir> ] [ -c=<cmd> ] [ -e=<env_file> ] | delete | show ]"
echo " $ $0 status"
echo ""
Expand Down Expand Up @@ -329,17 +329,24 @@ main() {
shift
"hell_conf_$i" $@
;;
"start" | "stop" | "status" | "restart" | "reload")
hell_load_service_info $1
local i=$2
"start" | "stop" | "restart" | "reload")
hell_load_service_info $2
local i=$1
shift
shift
"hell_ctl_$i" $@
;;
"status")
local i=$1
shift
"hell_$i" $@
if [ -z $1 ]
then
"hell_$i" $@
else
hell_load_service_info $1
shift
"hell_ctl_$i" $@
fi
exit 0
;;
*)
Expand Down

0 comments on commit ad0395e

Please sign in to comment.