2009-09-01 Sancho Lerena <slerena@artica.es>

* linux/pandora_agent.spec: Using chkconfig to manage service
        instalation/deinstallation.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1901 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-09-01 16:31:14 +00:00
parent b6cc9f820a
commit b3b63955d0
2 changed files with 8 additions and 22 deletions

View File

@ -1,3 +1,9 @@
2009-09-01 Sancho Lerena <slerena@artica.es>
* linux/pandora_agent.spec: Using chkconfig to manage service
instalation/deinstallation.
2009-08-22 Sancho Lerena <slerena@artica.es> 2009-08-22 Sancho Lerena <slerena@artica.es>
* linux/pandora_agent.spec: Update uninstall process. * linux/pandora_agent.spec: Update uninstall process.

View File

@ -92,36 +92,16 @@ if [ ! -e /etc/pandora/pandora_agent.conf ]; then
ln -s /usr/share/pandora_agent/pandora_agent.conf /etc/pandora/pandora_agent.conf ln -s /usr/share/pandora_agent/pandora_agent.conf /etc/pandora/pandora_agent.conf
fi fi
%if "%{_vendor}" == "redhat" chkconfig -s pandora_agent_daemon on
ln -s /etc/init.d/pandora_agent_daemon /etc/rc0.d/K99pandora_agent_daemon
ln -s /etc/init.d/pandora_agent_daemon /etc/rc3.d/S99pandora_agent_daemon
ln -s /etc/init.d/pandora_agent_daemon /etc/rc5.d/S99pandora_agent_daemon
%else
ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc5.d/S99pandora_agent_daemon
ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc3.d/S99pandora_agent_daemon
ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc2.d/S99pandora_agent_daemon
ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc0.d/K99pandora_agent_daemon
%endif
%preun %preun
chkconfig -d pandora_agent_daemon
/etc/init.d/pandora_agent_daemon stop /etc/init.d/pandora_agent_daemon stop
rm /etc/init.d/pandora_agent_daemon rm /etc/init.d/pandora_agent_daemon
/usr/sbin/userdel pandora /usr/sbin/userdel pandora
rm -Rf /etc/pandora/pandora_agent.conf rm -Rf /etc/pandora/pandora_agent.conf
rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
%if "%{_vendor}" == "redhat"
/sbin/chkconfig --del pandora_agent_daemon
rm /etc/rc0.d/K99pandora_agent_daemon
rm /etc/rc3.d/S99pandora_agent_daemon
rm /etc/rc5.d/S99pandora_agent_daemon
%else
rm /etc/rc.d/rc5.d/S99pandora_agent_daemon
rm /etc/rc.d/rc3.d/S99pandora_agent_daemon
rm /etc/rc.d/rc2.d/S99pandora_agent_daemon
rm /etc/rc.d/rc0.d/K99pandora_agent_daemon
%endif
exit 0 exit 0
%files %files