소스 검색

After running chkconfig, run systemctl if it exists. Reason: systemctl

--system daemon-reload needs to be run for Sniffer to be started and stopped
under OpenSuse 12.3.

Revert to using /sbin/service to start/stop Sniffer.
Reason:  /sbin/service works correctly if systemctl is run.


git-svn-id: https://svn.microneil.com/svn/PKG-SNF-CS-NIX/trunk@106 233e721a-07f6-49eb-a7da-05e0e16828fc
master
adeniz 11 년 전
부모
커밋
7ea2f50364
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8
    3
      SNF_CS_Developer_Package/snf-server.spec.in

+ 8
- 3
SNF_CS_Developer_Package/snf-server.spec.in 파일 보기

@@ -94,18 +94,23 @@ make DESTDIR=%{buildroot} install
/sbin/chkconfig snf-server on

# Start the service.
/etc/init.d/snf-server start
/sbin/service snf-server start

%preun
# Stop the service if it is running.
/etc/init.d/snf-server status | grep running > /dev/null 2>&1
/sbin/service snf-server status | grep running > /dev/null 2>&1
if [ $? == 0 ]; then
/etc/init.d/snf-server stop
/sbin/service snf-server stop
fi

# Remove the service.
/sbin/chkconfig --del snf-server

# Reload the daemons if the systemctl command exists.
if command -v /usr/bin/systemctl > /dev/null 2>&1; then
/usr/bin/systemctl --system daemon-reload
fi

%clean
rm -rf $RPM_BUILD_ROOT


Loading…
취소
저장