DaemonManager
is a project that combines a Bash script and a C program to manage daemons and signals. The project includes:
- A Bash script (
DaemonManager
) to manage daemonized tasks. - A C program (
signal_handler.c
) to handle signals for the daemons.
- Install the script and binary to
/usr/local/bin
for system-wide usage. - Provide an intuitive way to manage background processes.
- A Linux environment with:
bash
gcc
- Root (sudo) privileges for installation.
To install DaemonManager
and the associated C program:
-
Clone this repository:
git clone https://github.com/your-username/daemon-manager.git cd daemon-manager
-
Run the
install.sh
script as root:sudo ./install.sh
The install.sh
script:
- Checks for root privileges.
- Validates the existence of
DaemonManager
andsignal_handler.c
. - Compiles
signal_handler.c
into an executable binary. - Installs both the Bash script and the compiled binary to
/usr/local/bin
.
After installation, you can use DaemonManager
by simply typing:
DaemonManager
Ensure that the installed script and binary have execute permissions. The installation script takes care of this automatically.
- DaemonManager: The main Bash script for daemon management.
- signal_handler.c: A C program that handles signals.
To uninstall DaemonManager
and its components:
- Remove the installed files:
sudo rm /usr/local/bin/DaemonManager /usr/local/bin/signal_handler
Contributions are welcome! Feel free to fork this repository and submit a pull request.
This project is licensed under the MIT License.