Переглянути джерело

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


Завантаження…
Відмінити
Зберегти