Skip to content

Commit

Permalink
[BUILD]Rename files on disk needed for systemd and service start. (#302)
Browse files Browse the repository at this point in the history
The Debian packages build ok with fpm, but installing it fails due
to an invalid username and group name (see useradd(8): CAVEATS).
Once this was fixed, the service failed to start due to parts of the startup
configuration wanting files that did not exist on disk.

Files renamed to where systemd expects and runtime username
and group name changed to a supported form.

Tested on Debian 10.

Signed-off-by: Cole White <[email protected]>
  • Loading branch information
shdubsh authored and kavilla committed May 21, 2021
1 parent e5b75e9 commit 63b9384
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/dev/build/tasks/os_packages/run_fpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ export async function runFpm(
// define template values that will be injected into the install/uninstall
// scripts, also causes scripts to be processed with erb
'--template-value',
`user=opensearchDashboards`,
`user=opensearch-dashboards`,
'--template-value',
`group=opensearchDashboards`,
`group=opensearch-dashboards`,
'--template-value',
`optimizeDir=/usr/share/opensearch-dashboards/optimize`,
'--template-value',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Description=OpenSearch Dashboards

[Service]
Type=simple
User=opensearchDashboards
Group=opensearchDashboards
User=opensearch-dashboards
Group=opensearch-dashboards
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
user="opensearchDashboards"
group="opensearchDashboards"
user="opensearch-dashboards"
group="opensearch-dashboards"
chroot="/"
chdir="/"
nice=""
Expand All @@ -10,4 +10,4 @@ nice=""
# The default behavior is to simply log a message "program stop failed; still running"
KILL_ON_STOP_TIMEOUT=0

OSD_PATH_CONF="/etc/opensearch_dashboards"
OSD_PATH_CONF="/etc/opensearch-dashboards"

0 comments on commit 63b9384

Please sign in to comment.