Git Product home page Git Product logo

ntp-configure's Introduction

NTP Configuration Script

This Bash script simplifies the configuration of NTP (Network Time Protocol) settings on Ubuntu-based GNU/Linux systems. It provides options for both configuring an NTP server and an NTP client.

Features

  • Supports configuring NTP servers and clients.
  • Ability to specify custom remote NTP servers.
  • Automated installation of the NTP package if not already installed.
  • Disables systemd-timesyncd when configuring an NTP server.

Prerequisites

  • An Ubuntu-based GNU/Linux system.
  • BASH (usually pre-installed on GNU/Linux systems).

Usage

  1. Clone this repository or download the script (ntp-configure.sh) to your local machine.

  2. Open a terminal and navigate to the directory containing the script.

  3. Run the script with the desired command and arguments. See Usage Examples for more details.

Commands

The script supports the following commands:

  • server-configure: Configure the system as an NTP server.
  • client-configure <server_ip>: Configure the system as an NTP client, specifying the NTP server's IP address.
  • --help or -h: Display usage information.

Examples

Configure an NTP Server

./ntp-configure.sh server-configure

To configure an NTP server with custom remote NTP servers:

./ntp-configure.sh server-configure --remote-ntp-servers "2.tr.pool.ntp.org 0.europe.pool.ntp.org 3.europe.pool.ntp.org"

Configure an NTP Client

./ntp-configure.sh client-configure 172.17.0.3

License

This script is released under the MIT License.

ntp-configure's People

Contributors

mebasoglu avatar stepturtle avatar

Stargazers

Ahmet Çelik avatar  avatar

Watchers

 avatar  avatar

Forkers

stepturtle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.