Skip to content

Commit

Permalink
Adopt an instance service for providers
Browse files Browse the repository at this point in the history
Instead of creating a unique service file for each provider, just use a
single instance service. We'll change the symlinks in packaging.
  • Loading branch information
bwarden authored and bryteise committed Oct 21, 2022
1 parent abc97b9 commit d0f1601
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 62 deletions.
6 changes: 2 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ EXTRA_DIST = \
LICENSE \
COPYING \
data/ucd.service.in \
data/ucd@.service.in \
docs/ucd.1.md \
docs/ucd-data-fetch.1.md \
docs/cloud-config.5.md
Expand Down Expand Up @@ -87,10 +88,7 @@ ucd_data_fetch_CFLAGS = $(AM_CFLAGS)
SYSTEMD_DIR=$(prefix)/lib/systemd/system/
systemdsystemunitdir = @SYSTEMD_SYSTEMUNITDIR@
systemdsystemunit_DATA = data/ucd.service \
data/ucd-aws.service \
data/ucd-oci.service \
data/ucd-tencent.service \
data/ucd-aliyun.service
data/ucd@.service

systemdsystemunit-install-local:
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/
Expand Down
5 changes: 1 addition & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_FILES([Makefile
tests/Makefile
data/ucd.service
data/ucd-aws.service
data/ucd-oci.service
data/ucd-tencent.service
data/ucd-aliyun.service])
data/ucd@.service])
AC_CONFIG_HEADERS([config.h])

LT_INIT
Expand Down
17 changes: 0 additions & 17 deletions data/ucd-aliyun.service.in

This file was deleted.

17 changes: 0 additions & 17 deletions data/ucd-oci.service.in

This file was deleted.

17 changes: 0 additions & 17 deletions data/ucd-tencent.service.in

This file was deleted.

6 changes: 3 additions & 3 deletions data/ucd-aws.service.in → data/ucd@.service.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Unit]
Description=micro-config-drive job for AWS
Description=micro-config-drive job for %I
After=network.target systemd-networkd.service
Wants=local-fs.target sshd.service sshd-keygen.service
ConditionPathExists=!/var/lib/cloud/aws-user-data
ConditionPathExists=!/var/lib/cloud/%I-user-data

[Service]
Type=oneshot
ExecStart=@prefix@/bin/ucd-data-fetch aws
ExecStart=@prefix@/bin/ucd-data-fetch %I
RemainAfterExit=yes
TimeoutSec=0

Expand Down

0 comments on commit d0f1601

Please sign in to comment.