diff --git a/README.md b/README.md index f6f066a..764a521 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,9 @@ chmod +x service_generator ![](./screens/edit_service.png) -- Set manual directive `Service,ExecStart` to `my_binary` -- Set the service working directory to the current location using option 5 -- Finally set the user to `davenchy` using option 6 +- Set manual directive `Service:ExecStart` to `my_binary` +- Set the service working directory to the current location using option 6 +- Finally set the user to `davenchy` using option 7 ![](./screens/set_service_directives.png) @@ -74,6 +74,10 @@ chmod +x service_generator ![](./screens/save_service.png) +- Let's check the final results using the List option + +![](./screens/list_service.png) + ## Help Messages ### Control Mode diff --git a/screens/control_service.png b/screens/control_service.png index cbdff5a..320fae9 100644 Binary files a/screens/control_service.png and b/screens/control_service.png differ diff --git a/screens/create_service.png b/screens/create_service.png index 7f35961..941e3eb 100644 Binary files a/screens/create_service.png and b/screens/create_service.png differ diff --git a/screens/edit_service.png b/screens/edit_service.png index 427ee23..29bea33 100644 Binary files a/screens/edit_service.png and b/screens/edit_service.png differ diff --git a/screens/list_service.png b/screens/list_service.png new file mode 100644 index 0000000..7f2fcc5 Binary files /dev/null and b/screens/list_service.png differ diff --git a/screens/save_service.png b/screens/save_service.png index c36ff00..3517ebe 100644 Binary files a/screens/save_service.png and b/screens/save_service.png differ diff --git a/screens/search_service.png b/screens/search_service.png index 06b0f62..918281f 100644 Binary files a/screens/search_service.png and b/screens/search_service.png differ diff --git a/screens/set_service_directives.png b/screens/set_service_directives.png index 05a114d..6432500 100644 Binary files a/screens/set_service_directives.png and b/screens/set_service_directives.png differ diff --git a/service_generator b/service_generator index 0d2b266..8e4c3af 100755 --- a/service_generator +++ b/service_generator @@ -541,7 +541,9 @@ function CreateService { # get service name while true; do - read -re -p "${GREEN}Enter service name: ${YELLOW}" -i "$service_name" service_name + read -re -p "${GREEN}Enter service name (leave empty to cancel): ${YELLOW}" -i "$service_name" service_name + # Check for process abort + [ -z "$service_name" ] && return 1 # if no service exists with the same name then goto next step ServiceExists "$service_name" || break # display error and loop if service with the same name exists