zsh-myservice
is a zsh plugin designed to help you manage custom systemd services and Docker containers more conveniently. This plugin provides user-friendly commands to list and check the status of your custom services and Docker containers straight from your command line.
- List Custom Services (llcs): Displays custom systemd services with their names, statuses, and descriptions.
- List Docker Containers (lldc): Lists Docker containers with their names, statuses, and images.
You can install zsh-myservice
in a few simple steps. The installation involves cloning the plugin into your Zsh custom plugins directory and configuring .zshrc
to load the plugin.
-
Clone the Repository
First, clone the
zsh-myservice
repository into your custom plugins directory (e.g.,~/.oh-my-zsh/custom/plugins
):git clone https://github.com/jarlor/zsh-myservice.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-myservice
-
Activate the Plugin
Open your
.zshrc
file and addzsh-myservice
to the list of plugins:plugins=(... zsh-myservice)
-
Source the
.zshrc
fileApply the changes by sourcing your
.zshrc
file:source ~/.zshrc
Now, the
zsh-myservice
plugin should be active.
Once the plugin is installed and active, you can use the following commands:
-
llcs: Lists custom systemd services with their names, statuses, and descriptions.
llcs
Example Output:
Custom Services: ---------------- Service Status Description myservice active My custom service description another-service inactive Another custom service description
-
lldc: Lists Docker containers with their names, statuses, and images.
lldc
Example Output:
Docker Containers: ------------------ NAMES STATUS IMAGE mydocker1 Up 3 minutes ubuntu:latest mydocker2 Exited (0) 5 minutes ago nginx:latest
If your custom services are not in the default directory (/root/.service
), the plugin will prompt you to specify the custom service directory. Once specified, the directory is saved in a configuration file for future use.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License - see the LICENSE file for details.