mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
fix: Ensure static web assets are installed and clarify service config
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
parent
af0a512187
commit
8e369a2e3a
2 changed files with 8 additions and 3 deletions
8
setup.sh
8
setup.sh
|
|
@ -21,11 +21,13 @@ echo "🔧 Creating directories..."
|
||||||
sudo mkdir -p $INSTALL_DIR
|
sudo mkdir -p $INSTALL_DIR
|
||||||
echo "✅ Directory $INSTALL_DIR created."
|
echo "✅ Directory $INSTALL_DIR created."
|
||||||
|
|
||||||
# 3. Install binary
|
# 3. Install binary and static web files
|
||||||
echo "🚀 Installing timeturner binary..."
|
echo "🚀 Installing timeturner binary and web assets..."
|
||||||
sudo cp target/release/ntp_timeturner $INSTALL_DIR/timeturner
|
sudo cp target/release/ntp_timeturner $INSTALL_DIR/timeturner
|
||||||
|
# The static directory contains the web UI files
|
||||||
|
sudo cp -r static $INSTALL_DIR/
|
||||||
sudo ln -sf $INSTALL_DIR/timeturner $BIN_DIR/timeturner
|
sudo ln -sf $INSTALL_DIR/timeturner $BIN_DIR/timeturner
|
||||||
echo "✅ Binary installed to $INSTALL_DIR and linked to $BIN_DIR."
|
echo "✅ Binary and assets installed to $INSTALL_DIR, and binary linked to $BIN_DIR."
|
||||||
|
|
||||||
# 4. Install systemd service file
|
# 4. Install systemd service file
|
||||||
if [[ "$(uname)" == "Linux" ]]; then
|
if [[ "$(uname)" == "Linux" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
|
# The 'timeturner daemon' command starts the background process.
|
||||||
|
# It requires 'config.yml' and the 'static/' web assets directory
|
||||||
|
# to be present in the WorkingDirectory.
|
||||||
ExecStart=/opt/timeturner/timeturner daemon
|
ExecStart=/opt/timeturner/timeturner daemon
|
||||||
WorkingDirectory=/opt/timeturner
|
WorkingDirectory=/opt/timeturner
|
||||||
PIDFile=/opt/timeturner/ntp_timeturner.pid
|
PIDFile=/opt/timeturner/ntp_timeturner.pid
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue