Skip to content

Commit 1743713

Browse files
authored
Merge pull request #585 from jschoiRR/mold-diplo-2024-main
[Mold API, Agent] rpm 설치 후 mold-agent, mold-usage 서비스 설치시 프로세스 정지 후 서비스 삭제 로직 수정
2 parents cd9af34 + d75be95 commit 1743713

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packaging/centos8/cloud.spec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,12 @@ if [ -f "/usr/share/cloudstack-common/scripts/installer/cloudstack-help-text" ];
478478
sed -i "s,^ACS_VERSION=.*,ACS_VERSION=%{_maventag},g" /usr/share/cloudstack-common/scripts/installer/cloudstack-help-text
479479
/usr/share/cloudstack-common/scripts/installer/cloudstack-help-text management
480480
fi
481+
/usr/bin/systemctl enable mold > /dev/null 2>&1 || true
481482

482483
%preun agent
483484
/sbin/service mold-agent stop || true
484485
if [ "$1" == "0" ] ; then
485-
/sbin/chkconfig --del cloudstack-agent > /dev/null 2>&1 || true
486+
/sbin/chkconfig --del mold-agent > /dev/null 2>&1 || true
486487
fi
487488

488489
%pre agent
@@ -530,9 +531,9 @@ id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -U -c "CloudStack unprivileged
530531
-r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
531532

532533
%preun usage
533-
/sbin/service cloudstack-usage stop || true
534+
/sbin/service mold-usage stop || true
534535
if [ "$1" == "0" ] ; then
535-
/sbin/chkconfig --del cloudstack-usage > /dev/null 2>&1 || true
536+
/sbin/chkconfig --del mold-usage > /dev/null 2>&1 || true
536537
fi
537538

538539
%post usage

packaging/systemd/cloudstack-management.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
Description=Mold Management Server
2727
After=syslog.target network.target mariadb.service mysqld.service mysql.service
2828
Wants=mariadb.service mysqld.service mysql.service
29+
Requires=mold-usage.service
2930

3031
[Service]
3132
UMask=0022

0 commit comments

Comments
 (0)