Skip to content

Commit

Permalink
respect DESTBINDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Feb 26, 2023
1 parent 354976b commit 18a1380
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ install: sabatrapd
@install -m 644 sabatrapd.yml.sample $(DESTETCDIR)/sabatrapd.yml
@install -m 644 systemd/sabatrapd.env $(DESTETCDIR)/sabatrapd.env
@install -m 644 systemd/sabatrapd.service `systemd-path systemd-system-unit`
@sed -i -e "s|%DESTETCDIR%|$(DESTETCDIR)|" `systemd-path systemd-system-unit`/sabatrapd.service
@sed -i -e "s|%DESTBINDIR%|$(DESTBINDIR)|" -e "s|%DESTETCDIR%|$(DESTETCDIR)|" `systemd-path systemd-system-unit`/sabatrapd.service
@echo "Installation is finished."
@echo "Modify $(DESTETCDIR)/sabatrapd.yml, then run 'systemctl enable sabatrapd.service && systemctl start sabatrapd.service'"
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install -m 755 sabatrapd $DESTBINDIR || exit 1
install -m 644 sabatrapd.yml $DESTETCDIR/sabatrapd.yml || exit 1
install -m 644 systemd/sabatrapd.env $DESTETCDIR/sabatrapd.env || exit 1
install -m 644 systemd/sabatrapd.service `systemd-path systemd-system-unit` || exit 1
sed -i -e "s|%DESTETCDIR%|$DESTETCDIR|" `systemd-path systemd-system-unit`/sabatrapd.service || exit 1
sed -i -e "s|%DESTBINDIR%|$DESTBINDIR|" -e "s|%DESTETCDIR%|$DESTETCDIR|" `systemd-path systemd-system-unit`/sabatrapd.service || exit 1
systemctl enable sabatrapd.service || exit 1
systemctl start sabatrapd.service || exit 1
echo "sabatrapd installation is finished."
Expand Down
2 changes: 1 addition & 1 deletion systemd/sabatrapd.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=network.target

[Service]
EnvironmentFile=-%DESTETCDIR%/sabatrapd.env
ExecStart=/usr/local/bin/sabatrapd -conf %DESTETCDIR%/sabatrapd.yml
ExecStart=%DESTBINDIR%/sabatrapd -conf %DESTETCDIR%/sabatrapd.yml

[Install]
WantedBy=multi-user.target

0 comments on commit 18a1380

Please sign in to comment.