Skip to content

Commit 480dbdf

Browse files
committed
fix: do not overwrite config if it exists alread while sudo make install
1 parent 4fe9172 commit 480dbdf

2 files changed

Lines changed: 3 additions & 74 deletions

File tree

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ install:
3131
@cp build/$(TARGET) /usr/local/bin/
3232
@setcap 'cap_net_bind_service=+ep' /usr/local/bin/$(TARGET)
3333
@mkdir -p /usr/local/etc/$(TARGET)
34-
@cp sample_config.json /usr/local/etc/$(TARGET)/config.json
34+
@test -s /usr/local/etc/$(TARGET)/config.json || { cp sample_config.json /usr/local/etc/$(TARGET)/config.json }
3535
@cp arc.service /etc/systemd/system/
3636
@systemctl daemon-reload
37+
@systemctl enable arc
38+
@service arc restart

pi_update.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)