Update systemd unit instructions
This commit is contained in:
@@ -33,7 +33,8 @@ A Python application that displays the current time in `HH:MM:SS` format using f
|
|||||||
|
|
||||||
1. Clone or download this repository:
|
1. Clone or download this repository:
|
||||||
```bash
|
```bash
|
||||||
cd ~/ntpclock
|
git clone https://github.com/adamhf/mini-rack-ntp-clock.git
|
||||||
|
cd mini-rack-ntp-clock
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create a virtual environment:
|
2. Create a virtual environment:
|
||||||
@@ -132,21 +133,20 @@ The display shows time in `HH:MM:SS` format across 32x8 pixels:
|
|||||||
|
|
||||||
## Running at Boot (Raspberry Pi)
|
## Running at Boot (Raspberry Pi)
|
||||||
|
|
||||||
A systemd service file is included. To install:
|
A systemd service file template is included. To install:
|
||||||
|
|
||||||
```bash
|
1. Edit `ntpclock.service` and replace the placeholders:
|
||||||
# Copy the service file
|
- `<CHECKOUT_DIRECTORY>` - the full path to where you cloned the repo (e.g., `/home/pi/mini-rack-ntp-clock`)
|
||||||
sudo cp ntpclock.service /etc/systemd/system/
|
- `<USER>` - your username (e.g., `pi` or `dietpi`)
|
||||||
|
- Optionally adjust the `-b 16` brightness value
|
||||||
|
|
||||||
# Reload systemd
|
2. Copy and enable the service:
|
||||||
sudo systemctl daemon-reload
|
```bash
|
||||||
|
sudo cp ntpclock.service /etc/systemd/system/
|
||||||
# Enable to start on boot
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable ntpclock.service
|
sudo systemctl enable ntpclock.service
|
||||||
|
sudo systemctl start ntpclock.service
|
||||||
# Start now
|
```
|
||||||
sudo systemctl start ntpclock.service
|
|
||||||
```
|
|
||||||
|
|
||||||
To check status or view logs:
|
To check status or view logs:
|
||||||
```bash
|
```bash
|
||||||
@@ -160,8 +160,6 @@ sudo systemctl stop ntpclock.service
|
|||||||
sudo systemctl disable ntpclock.service
|
sudo systemctl disable ntpclock.service
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** Edit the service file if you need to adjust the brightness or if your installation path differs from `/home/dietpi/ntpclock/`.
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### SPI Permission Denied
|
### SPI Permission Denied
|
||||||
|
|||||||
Reference in New Issue
Block a user