From 3c14db61228ec3a66d85c2df4f7cc14c010c61bc Mon Sep 17 00:00:00 2001 From: Michal Bielicki Date: Thu, 6 Dec 2007 17:36:01 +0000 Subject: [PATCH] dded installation of monit file fixed typo in init file now lets finally go to testing and qa :)) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6538 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- build/freeswitch.init.redhat | 2 +- freeswitch.spec | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/freeswitch.init.redhat b/build/freeswitch.init.redhat index a01632e32b..2047018c70 100644 --- a/build/freeswitch.init.redhat +++ b/build/freeswitch.init.redhat @@ -30,7 +30,7 @@ RETVAL=0 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 diff --git a/freeswitch.spec b/freeswitch.spec index c6b9c73efd..29e6cab14d 100644 --- a/freeswitch.spec +++ b/freeswitch.spec @@ -238,6 +238,9 @@ ln -sf /etc/init.d/freeswitch $RPM_BUILD_ROOT/usr/sbin/rcfreeswitch # 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 @@ ln -sf /opt/freeswitch/conf /etc/opt/freeswitch %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 @@ rm -rf $RPM_BUILD_ROOT %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