Skip to content

Commit 3aa6d21

Browse files
authored
Merge pull request #161 from thin-edge/fix-openrc-service-config
fix: openrc service ignoring config file
2 parents f3cccfc + 8828e1d commit 3aa6d21

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,16 @@ nfpms:
166166
packager: apk
167167

168168
# OpenRC
169-
# Note: symlinks will be created linking the services during the post install script
170-
# if openrc is detected
171169
- src: ./packaging/services/openrc/tedge-container-plugin.init
172-
dst: /usr/share/tedge-container-plugin/services/openrc/init.d/tedge-container-plugin
170+
dst: /etc/init.d/tedge-container-plugin
173171
file_info:
174172
mode: 0755
175173
owner: root
176174
group: root
177175
packager: apk
178176

179177
- src: ./packaging/services/openrc/tedge-container-plugin.conf
180-
dst: /usr/share/tedge-container-plugin/services/openrc/conf.d/tedge-container-plugin
178+
dst: /etc/conf.d/tedge-container-plugin
181179
type: config
182180
file_info:
183181
mode: 0644

packaging/scripts/post-install

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ cleanInstall() {
4343
# OpenRC
4444
printf "\033[32m Installing open-rc service\033[0m\n"
4545

46-
ln -sf /usr/share/tedge-container-plugin/services/openrc/init.d/tedge-container-plugin /etc/init.d/tedge-container-plugin ||:
47-
ln -sf /usr/share/tedge-container-plugin/services/openrc/conf.d/tedge-container-plugin /etc/conf.d/tedge-container-plugin ||:
48-
4946
rc-update add "$SERVICE_NAME" ||:
5047
rc-service "$SERVICE_NAME" restart ||:
5148
else

packaging/services/openrc/tedge-container-plugin.init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error_log="${LOGFILE:-/var/log/${RC_SVCNAME}.log}"
1010

1111
start_pre()
1212
{
13-
checkpath --file --owner "root" "$error_log"
13+
checkpath --file --owner "$command_user" "$error_log"
1414
}
1515

1616
depend() {

pkg/container/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func findContainerEngineSocket() (socketAddr string) {
245245
}
246246

247247
currentUserID := GetUserID()
248-
slog.Info("Detected user id", "id", currentUserID)
248+
slog.Info("Current user", "id", currentUserID)
249249

250250
// docker (rootless)
251251
containerSockets = append(containerSockets, fmt.Sprintf("unix:///run/user/%s/docker.sock", currentUserID))

0 commit comments

Comments
 (0)