Skip to content

Commit

Permalink
install config to etc
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcichra committed Oct 28, 2023
1 parent de63485 commit 380c467
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ _build:
cd gps_collector && go build -v -o gps_collector
_install:
sudo cp wwan_keep_alive.py /usr/local/bin/wwan_keep_alive.py
sudo mkdir -p /etc/gps_collector/
sudo cp gps_collector/config.yaml /etc/gps_collector/config.yaml
sudo cp wwan_keep_alive.service /etc/systemd/system/
sudo systemctl disable --now wwan_keep_alive
sudo systemctl daemon-reload
Expand All @@ -20,6 +22,7 @@ _uninstall:
sudo systemctl disable --now gps_collector
sudo rm /etc/systemd/system/gps_collector.service
sudo rm /usr/local/bin/gps_collector
sudo rm -r /etc/gps_collector
build: _build
install: _build _install
uninstall: _uninstall
2 changes: 1 addition & 1 deletion gps_collector/gps_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func queueToPost(q *dque.DQue, h *http.Client, cfg Config) {

func main() {
// parse the config file
configPath := flag.String("config", "config.yaml", "path to config file")
configPath := flag.String("config", "/etc/gps_collector/config.yaml", "path to config file")
flag.Parse()

configFile, err := os.ReadFile(*configPath)
Expand Down

0 comments on commit 380c467

Please sign in to comment.