mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
docs: Detail setup.sh installation process in README
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
parent
5d206b564b
commit
4d0b4ebae4
1 changed files with 34 additions and 11 deletions
45
README.md
45
README.md
|
|
@ -48,19 +48,42 @@ When running as a background daemon, TimeTurner provides a web interface for mon
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🚀 Installation (to update)
|
## 🚀 Installation
|
||||||
|
|
||||||
For Rust install you can do
|
The `setup.sh` script is provided to compile and install the TimeTurner application and its systemd service on a Debian-based system like Raspberry Pi OS.
|
||||||
```bash
|
|
||||||
cargo install --git https://github.com/cjfranko/NTP-Timeturner
|
|
||||||
```
|
|
||||||
Clone and run the installer:
|
|
||||||
|
|
||||||
```bash
|
### Prerequisites
|
||||||
wget https://raw.githubusercontent.com/cjfranko/NTP-Timeturner/master/setup.sh
|
|
||||||
chmod +x setup.sh
|
- **Rust and Cargo**: The script requires the Rust programming language toolchain. If you don't have it, install it from [rustup.rs](https://rustup.rs/).
|
||||||
./setup.sh
|
|
||||||
```
|
### Running the Installer
|
||||||
|
|
||||||
|
1. First, clone the repository:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/cjfranko/NTP-Timeturner.git
|
||||||
|
cd NTP-Timeturner
|
||||||
|
```
|
||||||
|
2. Make the script executable and run it. The script will use `sudo` for commands that require root privileges, so it may ask for your password.
|
||||||
|
```bash
|
||||||
|
chmod +x setup.sh
|
||||||
|
./setup.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### What the Script Does
|
||||||
|
|
||||||
|
The installation script automates the following steps:
|
||||||
|
|
||||||
|
1. **Compiles the Binary**: Runs `cargo build --release` to create an optimised executable.
|
||||||
|
2. **Creates Directories**: Creates `/opt/timeturner` to store the application files.
|
||||||
|
3. **Installs Files**:
|
||||||
|
- The compiled binary is copied to `/opt/timeturner/timeturner`.
|
||||||
|
- The web interface assets from the `static/` directory are copied to `/opt/timeturner/static`.
|
||||||
|
- A symbolic link is created from `/usr/local/bin/timeturner` to the binary, allowing it to be run from any location.
|
||||||
|
4. **Sets up Systemd Service**:
|
||||||
|
- Copies the `timeturner.service` file to `/etc/systemd/system/`.
|
||||||
|
- Enables the service to start automatically on system boot.
|
||||||
|
|
||||||
|
After installation is complete, the script will provide instructions to start the service manually or to run the application in its interactive terminal mode.
|
||||||
|
|
||||||
---
|
---
|
||||||
## 🕰️ Chrony NTP
|
## 🕰️ Chrony NTP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue