]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
systemd: use CMake install prefix in templates
authorsteven <steven.chien@ed.ac.uk>
Thu, 31 Oct 2024 11:40:57 +0000 (11:40 +0000)
committersteven <steven.chien@ed.ac.uk>
Thu, 31 Oct 2024 17:20:22 +0000 (17:20 +0000)
The current systemd services use hard coded paths.
This commit uses CMake install prefix in the templates to
setup paths to executables where they are actually installed.

Signed-off-by: steven <steven.chien@ed.ac.uk>
13 files changed:
systemd/ceph-crash.service.in
systemd/ceph-exporter.service.in
systemd/ceph-fuse@.service.in
systemd/ceph-immutable-object-cache@.service.in
systemd/ceph-mds@.service.in
systemd/ceph-mgr@.service.in
systemd/ceph-mon@.service.in
systemd/ceph-osd@.service.in
systemd/ceph-radosgw@.service.in
systemd/ceph-rbd-mirror@.service.in
systemd/ceph-volume@.service
systemd/cephfs-mirror@.service.in
systemd/rbdmap.service.in

index 8304dd61220bbe22ca01f277962bcc9557c18165..f01132446fc205acb76d2a00bc9e5dccf052c506 100644 (file)
@@ -3,7 +3,7 @@ Description=Ceph crash dump collector
 
 [Service]
 Type=simple
-ExecStart=/usr/bin/ceph-crash
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-crash
 Restart=always
 RestartSec=10
 StartLimitInterval=10min
index f4f6d05c4b4d47b171a4aa40cc33e5be7a54359c..ce5b3b0a93cce54457606c02b5545c2cc2affeb0 100644 (file)
@@ -7,7 +7,7 @@ Wants=network-online.target local-fs.target ceph.target ceph-mon.target
 
 [Service]
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph
 LockPersonality=true
 NoNewPrivileges=true
 PrivateDevices=yes
index 0bde59a09c3530bef44199967dbe7490b2615065..add962c4018b598e2050287c861e9c4a7afb1f30 100644 (file)
@@ -7,7 +7,7 @@ PartOf=ceph-fuse.target
 
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
-ExecStart=/usr/bin/ceph-fuse -f %I
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-fuse -f %I
 LockPersonality=true
 MemoryDenyWriteExecute=true
 NoNewPrivileges=true
index 827444ba7da2c723b4d2ed177ee40142ab6e3444..7b2dc71ca2893b139cb8932b59d459da67879d34 100644 (file)
@@ -7,7 +7,7 @@ PartOf=ceph-immutable-object-cache.target
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/ceph-immutable-object-cache -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-immutable-object-cache -f --id %i --setuser ceph --setgroup ceph
 LockPersonality=true
 MemoryDenyWriteExecute=true
 NoNewPrivileges=true
index 628b402af9d0a910c7c8a64da7af5022c2eb4db4..b2fc3374b56406eeedb9d8e002188e11dad648bf 100644 (file)
@@ -8,7 +8,7 @@ Wants=network-online.target local-fs.target time-sync.target remote-fs-pre.targe
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/ceph-mds -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-mds -f --id %i --setuser ceph --setgroup ceph
 LimitNOFILE=1048576
 LimitNPROC=1048576
 LockPersonality=true
index 0c89b6f85ec81ac407e090566497461a6ea94b5d..42544d51cfe349ecc86a8489a83e2e2b90995daa 100644 (file)
@@ -8,7 +8,7 @@ Wants=network-online.target local-fs.target time-sync.target remote-fs-pre.targe
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/ceph-mgr -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-mgr -f --id %i --setuser ceph --setgroup ceph
 LimitNOFILE=1048576
 LimitNPROC=1048576
 LockPersonality=true
index 26626f465aa2dc37524b470cf89b0b1099b13351..06c6728422c803a76f683263ed6a5737c206b8a6 100644 (file)
@@ -12,7 +12,7 @@ Wants=network-online.target local-fs.target time-sync.target remote-fs-pre.targe
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/ceph-mon -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-mon -f --id %i --setuser ceph --setgroup ceph
 LimitNOFILE=1048576
 LimitNPROC=1048576
 LockPersonality=true
index eb67c21e047c0404f0b3ce1ae63f1becef361576..18c0591f5606621ec7a3200637fd26b085fa0c8b 100644 (file)
@@ -8,7 +8,7 @@ Wants=network-online.target local-fs.target time-sync.target remote-fs-pre.targe
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/ceph-osd -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-osd -f --id %i --setuser ceph --setgroup ceph
 ExecStartPre=@CMAKE_INSTALL_FULL_LIBEXECDIR@/ceph/ceph-osd-prestart.sh --id %i
 LimitNOFILE=1048576
 LimitNPROC=1048576
index a2d28c6ca6cd13520166a463e19b5845b1abb5c2..2146912b3ae4b73bea4a84ef80046c8d3919cd4b 100644 (file)
@@ -7,7 +7,7 @@ Wants=network-online.target local-fs.target time-sync.target remote-fs-pre.targe
 
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
-ExecStart=/usr/bin/radosgw -f --name client.%i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/radosgw -f --name client.%i --setuser ceph --setgroup ceph
 LimitNOFILE=1048576
 LimitNPROC=1048576
 LockPersonality=true
index d95b4288e947284f0fbc2562e282eab6dbc28aa0..caeedcbfca22704f916c2018dbeb0e4694bd308d 100644 (file)
@@ -7,7 +7,7 @@ PartOf=ceph-rbd-mirror.target
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
 ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=/usr/bin/rbd-mirror -f --id %i --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/rbd-mirror -f --id %i --setuser ceph --setgroup ceph
 LimitNOFILE=1048576
 LimitNPROC=1048576
 LockPersonality=true
index c21002cecb93407176a1977df6ad0e4f95e60cc1..78bfc256c76621e07317b4478f6476900f4a7d0a 100644 (file)
@@ -7,7 +7,7 @@ Wants=local-fs.target
 Type=oneshot
 KillMode=none
 Environment=CEPH_VOLUME_TIMEOUT=10000
-ExecStart=/bin/sh -c 'timeout $CEPH_VOLUME_TIMEOUT /usr/sbin/ceph-volume-systemd %i'
+ExecStart=/bin/sh -c 'timeout $CEPH_VOLUME_TIMEOUT @CMAKE_INSTALL_PREFIX@/sbin/ceph-volume-systemd %i'
 TimeoutSec=0
 
 [Install]
index 9f83c1d9c3d6ea61b8134326fe08bc0a08a0aa57..5367e76f5d3cd74a6ec26a5503c2d8e90438f132 100644 (file)
@@ -6,7 +6,7 @@ PartOf=cephfs-mirror.target
 
 [Service]
 EnvironmentFile=-@SYSTEMD_ENV_FILE@
-ExecStart=/usr/bin/cephfs-mirror --id %i -f --setuser ceph --setgroup ceph
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/cephfs-mirror --id %i -f --setuser ceph --setgroup ceph
 LimitNOFILE=1048576
 LimitNPROC=1048576
 LockPersonality=true
index 6644508cf0dea9ffb617bcf55e37d9315109926a..0933676d2aca064553a32b1eff19e99aec394346 100644 (file)
@@ -9,9 +9,9 @@ EnvironmentFile=-@SYSTEMD_ENV_FILE@
 Environment=RBDMAPFILE=/etc/ceph/rbdmap
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/usr/bin/rbdmap map
-ExecReload=/usr/bin/rbdmap map
-ExecStop=/usr/bin/rbdmap unmap-all
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/rbdmap map
+ExecReload=@CMAKE_INSTALL_PREFIX@/bin/rbdmap map
+ExecStop=@CMAKE_INSTALL_PREFIX@/bin/rbdmap unmap-all
 
 [Install]
 WantedBy=multi-user.target