|
|
@@ -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 |
|
|
|
|