Skip to content

Commit

Permalink
Fix executable name in new service
Browse files Browse the repository at this point in the history
  • Loading branch information
adamruzicka committed Oct 3, 2024
1 parent 58b2d9f commit 805937f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ go_sources := $(wildcard src/*.go)

build: $(go_sources)
mkdir -p build
CGO_ENABLED=0 go build -o build/foreman_worker $^
CGO_ENABLED=0 go build -o build/$(PKGNAME) $^

.PHONY: data
data: build/data/com.redhat.Yggdrasil1.Worker1.foreman.conf build/data/com.redhat.Yggdrasil1.Worker1.foreman.service

.PHONY: install
install: build data
install -D -m 755 build/foreman_worker $(DESTDIR)$(LIBEXECDIR)/foreman_worker
install -D -m 755 build/$(PKGNAME) $(DESTDIR)$(LIBEXECDIR)/$(PKGNAME)
install -D -m 644 build/data/com.redhat.Yggdrasil1.Worker1.foreman.conf $(DESTDIR)/usr/share/dbus-1/system.d/com.redhat.Yggdrasil1.Worker1.foreman.conf
install -D -m 644 data/dbus_com.redhat.Yggdrasil1.Worker1.foreman.service $(DESTDIR)/usr/share/dbus-1/system-services/com.redhat.Yggdrasil1.Worker1.foreman.service
install -D -m 644 build/data/com.redhat.Yggdrasil1.Worker1.foreman.service $(DESTDIR)/usr/lib/systemd/system/com.redhat.Yggdrasil1.Worker1.foreman.service
Expand Down Expand Up @@ -52,4 +52,5 @@ build/data/%: data/%.in
sed \
-e 's,[@]libexecdir[@],$(LIBEXECDIR),g' \
-e 's,[@]worker_group[@],$(WORKER_GROUP),g' \
-e 's,[@]executable[@],$(PKGNAME),g' \
$< > $@
2 changes: 1 addition & 1 deletion data/com.redhat.Yggdrasil1.Worker1.foreman.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Documentation=https://github.com/theforeman/foreman_ygg_worker
Type=dbus
User=root
Group=@worker_group@
ExecStart=@libexecdir@/foreman_worker
ExecStart=@libexecdir@/@executable@
BusName=com.redhat.Yggdrasil1.Worker1.foreman

[Install]
Expand Down

0 comments on commit 805937f

Please sign in to comment.