]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
dded installation of monit file
authorMichal Bielicki <michal.bielicki@seventhsignal.de>
Thu, 6 Dec 2007 17:36:01 +0000 (17:36 +0000)
committerMichal Bielicki <michal.bielicki@seventhsignal.de>
Thu, 6 Dec 2007 17:36:01 +0000 (17:36 +0000)
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
freeswitch.spec

index a01632e32b11ccb9c1b01cdb6cd81e947d98324c..2047018c70faae4755b88f74bdd3c4ab28a2b8c2 100644 (file)
@@ -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
index c6b9c73efd6129a438db9e586073691653ca81c6..29e6cab14dbd802c35583c92514a9a37f3f8c548 100644 (file)
@@ -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