浏览代码

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 10 年前
父节点
当前提交
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


正在加载...
取消
保存