Author: cypromis Date: Thu Dec 6 12:36:01 2007 New Revision: 6538 Modified: freeswitch/trunk/build/freeswitch.init.redhat freeswitch/trunk/freeswitch.spec Log: dded installation of monit file fixed typo in init file now lets finally go to testing and qa :)) Modified: freeswitch/trunk/build/freeswitch.init.redhat ============================================================================== --- freeswitch/trunk/build/freeswitch.init.redhat (original) +++ freeswitch/trunk/build/freeswitch.init.redhat Thu Dec 6 12:36:01 2007 @@ -30,7 +30,7 @@ start() { echo -n "Starting $prog: " if [ -e $lockfile ]; then - if [ -e $pidfile && [ -e /proc/`$pidfile` ]; then + if [ -e $pidfile ] && [ -e /proc/`$pidfile` ]; then echo -n $"cannot start freeswitch: freeswitch is already running."; failure $"cannot start freeswitch: freeswitch already running."; echo Modified: freeswitch/trunk/freeswitch.spec ============================================================================== --- freeswitch/trunk/freeswitch.spec (original) +++ freeswitch/trunk/freeswitch.spec Thu Dec 6 12:36:01 2007 @@ -238,6 +238,9 @@ # Add the sysconfiguration file install -D -m 744 build/freeswitch.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/freeswitch +# Add monit file +install -D -m 644 -u root -g root build/freeswitch.monitrc $RPM_BUILD_ROOT/etc/monit.d/freeswitch.monitrc + # Add a freeswitch user with group daemon %pre /usr/sbin/useradd -r -g daemon -s /bin/false -c "The FreeSWITCH Open Source Voice Platform" -d /opt/freeswitch/var freeswitch 2> /dev/null || : @@ -250,13 +253,15 @@ %postun %{?run_ldconfig:%run_ldconfig} +rm -rf /opt/freeswitch +userdel freeswitch %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,freeswitch,daemon) -%dir %attr(755,root,root) /etc/opt/ +%dir %attr(755,root,root) /etc/monit.d %dir %attr(750,freeswitch,daemon) /opt/freeswitch/db %dir %attr(750,freeswitch,daemon) /opt/freeswitch/log %dir %attr(750,freeswitch,daemon) /opt/freeswitch/log/xml_cdr @@ -269,6 +274,7 @@ %dir %attr(750,freeswitch,daemon) /opt/freeswitch/conf/directory %dir %attr(750,freeswitch,daemon) /opt/freeswitch/conf/lang %dir %attr(750,freeswitch,daemon) /opt/freeswitch/conf/sip_profiles +%config(noreplace) %attr(644,root,root) /etc/monit.d/freeswitch.monitrc %config(noreplace) %attr(640,freeswitch,daemon) /opt/freeswitch/conf/mime.types %config(noreplace) %attr(640,freeswitch,daemon) /opt/freeswitch/conf/*.tpl %config(noreplace) %attr(640,freeswitch,daemon) /opt/freeswitch/conf/*.xml