https://github.com/purinton/updater
Automated system updater and service manager for Red Hat-based Linux servers via SSH (yum/dnf). Not for Debian/Ubuntu.
https://github.com/purinton/updater
alma automation centos dnf fedora linux nodejs redhat rocky service-management ssh systemd updater yum
Last synced: 3 months ago
JSON representation
Automated system updater and service manager for Red Hat-based Linux servers via SSH (yum/dnf). Not for Debian/Ubuntu.
- Host: GitHub
- URL: https://github.com/purinton/updater
- Owner: purinton
- License: mit
- Created: 2025-06-19T13:54:26.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-07-11T16:11:40.000Z (7 months ago)
- Last Synced: 2025-10-11T06:54:51.536Z (4 months ago)
- Topics: alma, automation, centos, dnf, fedora, linux, nodejs, redhat, rocky, service-management, ssh, systemd, updater, yum
- Language: JavaScript
- Homepage: https://discord.gg/QSBxQnX7PF
- Size: 470 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [](https://discord.gg/QSBxQnX7PF)
## @purinton/updater [](https://www.npmjs.com/package/@purinton/updater)[](LICENSE)[](https://github.com/purinton/updater/actions)
A Node.js tool for automating system updates and service management across multiple remote Linux servers via SSH. **This tool is specifically designed for Red Hat-based systems (RHEL, CentOS, Fedora, Rocky, Alma, etc.) using `yum` or `dnf`. It is not intended for Debian/Ubuntu systems.** Includes notification support and can be run as a scheduled service.
---
## Table of Contents
- [Features](#features)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Development](#development)
- [Testing](#testing)
- [Customization](#customization)
- [Support](#support)
- [License](#license)
## Features
- Automated yum/dnf update checks and full system updates via SSH (Red Hat-based systems only)
- Service stop/start and verification
- Discord webhook notifications for update status
- Environment variable support via dotenv
- Logging and signal handling via `@purinton/common`
- Jest for testing
- Can be run as a systemd service
- MIT License
> **Note:** This tool is not intended for Debian/Ubuntu systems. It relies on `yum`/`dnf` commands and systemd service management.
## Getting Started
1. **Clone this repository:**
```bash
git clone https://github.com/purinton/updater.git
cd updater
npm install
```
2. **Configure your servers:**
- Copy `servers.json.example` to `servers.json` and edit it to list your servers and their managed services:
```json
{
"user@host1": ["service1", "service2"],
"user@host2": ["service3"]
}
```
- Set up your `.env` file as needed for secrets and webhook URLs.
> **Supported OS:** Only Red Hat-based distributions (RHEL, CentOS, Fedora, Rocky, Alma, etc.) with `yum` or `dnf` are supported. Debian/Ubuntu are not supported.
## Usage
- **Check for available updates and send notifications:**
```bash
node check-update.mjs
```
- Checks each server in `servers.json` for available yum updates.
- Sends a Discord notification if updates are found or if errors occur.
- **Perform full update, reboot, and service verification:**
```bash
node update.mjs
```
- Stops listed services, runs `yum -y update && reboot`, waits for the host to reboot, and verifies services are running again.
- **Run as a service:**
- Use the provided `check-update.service` file to run update checks on a schedule with systemd.
## Development
- Main entries: `check-update.mjs` (update check/notification), `update.mjs` (full update/reboot cycle)
- Start your app:
```bash
node check-update.mjs
# or
node update.mjs
```
- Add your code in new files and import as needed.
## Testing
- Run tests with:
```bash
npm test
```
- Tests are located in the `tests/` folder.
## Customization
- Extend or replace logging and notification as needed.
- Add dependencies and scripts to fit your project.
- Modify the update or service management logic as required.
## Support
For help, questions, or to chat with the author and community, visit:
[](https://discord.gg/QSBxQnX7PF)[](https://discord.gg/QSBxQnX7PF)
**[Purinton Dev on Discord](https://discord.gg/QSBxQnX7PF)**
## License
[MIT © 2025 Russell Purinton](LICENSE)
## Links
- [GitHub Repo](https://github.com/purinton/updater)
- [GitHub Org](https://github.com/purinton)
- [GitHub Personal](https://github.com/rpurinton)
- [Discord](https://discord.gg/QSBxQnX7PF)