Skip to content

Commit

Permalink
Dev: Add RUBY_SUFFIX make var to locate correct puma executable
Browse files Browse the repository at this point in the history
  • Loading branch information
krig committed Aug 27, 2017
1 parent 7764b40 commit 4defe0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ WWW_BASE = /usr/share
WWW_TMP = $(WWW_BASE)/hawk/tmp
WWW_LOG = $(WWW_BASE)/hawk/log

# Override this to append a suffix to the puma executable
# in the systemd service file
RUBY_SUFFIX =

# Override this to get a different init script (e.g. "redhat")
INIT_STYLE = suse

Expand All @@ -56,6 +60,7 @@ all: scripts/hawk.$(INIT_STYLE) scripts/hawk.service tools
-e 's|@LIBDIR@|$(LIBDIR)|g' \
-e 's|@BINDIR@|$(BINDIR)|g' \
-e 's|@SBINDIR@|$(SBINDIR)|g' \
-e 's|@RUBY_SUFFIX@|$(RUBY_SUFFIX)|g' \
-e 's|@WITHIN_VAGRANT@|$(WITHIN_VAGRANT)|g' \
$< > $@

Expand Down
6 changes: 3 additions & 3 deletions scripts/hawk.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ EnvironmentFile=-/etc/sysconfig/hawk
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=@WWW_BASE@/hawk/bin/generate-ssl-cert
ExecStart=/usr/bin/puma -C @WWW_BASE@/hawk/config/puma.rb
ExecStop=/usr/bin/pumactl -S @WWW_BASE@/hawk/tmp/pids/puma.state stop
ExecReload=/usr/bin/pumactl -S @WWW_BASE@/hawk/tmp/pids/puma.state restart
ExecStart=/usr/bin/puma@RUBY_SUFFIX@ -C @WWW_BASE@/hawk/config/puma.rb
ExecStop=/usr/bin/pumactl@RUBY_SUFFIX@ -S @WWW_BASE@/hawk/tmp/pids/puma.state stop
ExecReload=/usr/bin/pumactl@RUBY_SUFFIX@ -S @WWW_BASE@/hawk/tmp/pids/puma.state restart

[Install]
WantedBy=multi-user.target

0 comments on commit 4defe0d

Please sign in to comment.