Guest User

Untitled

a guest
Feb 25th, 2019
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. ### BEGIN INIT INFO
  4. # Provides: bitnami-processmaker
  5. # Required-Start: $remote_fs $syslog
  6. # Required-Stop: $remote_fs $syslog
  7. # Default-Start: 2 3 4 5
  8. # Default-Stop: 0 1 6
  9. # Short-Description: Start daemon at boot time
  10. # Description: Enable services provided by daemon.
  11. ### END INIT INFO
  12.  
  13. su michael -c "/home/michael/processmaker-3.3.4-0/ctlscript.sh $@"
  14.  
  15. # Avoid root execution
  16. if [ `id|sed -e s/uid=//g -e s/\(.*//g` -eq 0 ] && [ "$2" != "stop" ]; then
  17. echo "Execution by root not allowed"
  18. exit 1
  19. fi
  20.  
  21.  
  22. # Disabling SELinux if enabled
  23. if [ -f "/usr/sbin/getenforce" ] && [ `id -u` = 0 ] ; then
  24. selinux_status=`/usr/sbin/getenforce`
  25. /usr/sbin/setenforce 0 2> /dev/null
  26. fi
  27.  
  28. INSTALLDIR=/home/michael/processmaker-3.3.4-0
  29.  
  30. if [ -r "$INSTALLDIR/scripts/setenv.sh" ]; then
  31. . "$INSTALLDIR/scripts/setenv.sh"
  32. fi
  33.  
  34. ERROR=0
  35. MARIADB_SCRIPT=$INSTALLDIR/mariadb/scripts/ctl.sh
  36. MYSQL_SCRIPT=$INSTALLDIR/mysql/scripts/ctl.sh
  37. MONGODB_SCRIPT=$INSTALLDIR/mongodb/scripts/ctl.sh
  38. CASSANDRA_SCRIPT=$INSTALLDIR/cassandra/scripts/ctl.sh
  39. COUCHDB_SCRIPT=$INSTALLDIR/couchdb/scripts/ctl.sh
  40. INGRES_SCRIPT=$INSTALLDIR/ingres/scripts/ctl.sh
  41. PHPFPM_SCRIPT=$INSTALLDIR/php/scripts/ctl.sh
  42. HHVM_SCRIPT=$INSTALLDIR/hhvm/scripts/ctl.sh
  43. APACHE_SCRIPT=$INSTALLDIR/apache2/scripts/ctl.sh
  44. VARNISH_SCRIPT=$INSTALLDIR/varnish/scripts/ctl.sh
  45. NGINX_SCRIPT=$INSTALLDIR/nginx/scripts/ctl.sh
  46. HYPERSONIC_SCRIPT=$INSTALLDIR/hypersonic/scripts/ctl.sh
  47. SOLR_SCRIPT=$INSTALLDIR/apache-solr/scripts/ctl.sh
  48. ELASTICSEARCH_SCRIPT=$INSTALLDIR/elasticsearch/scripts/ctl.sh
  49. LOGSTASH_SCRIPT=$INSTALLDIR/logstash/scripts/ctl.sh
  50. LOGSTASHFORWARDER_SCRIPT=$INSTALLDIR/logstash-forwarder/scripts/ctl.sh
  51. KIBANA_SCRIPT=$INSTALLDIR/kibana/scripts/ctl.sh
  52. TOMCAT_SCRIPT=$INSTALLDIR/apache-tomcat/scripts/ctl.sh
  53. RESIN_SCRIPT=$INSTALLDIR/resin/scripts/ctl.sh
  54. REDIS_SCRIPT=$INSTALLDIR/redis/scripts/ctl.sh
  55. SUBVERSION_SCRIPT=$INSTALLDIR/subversion/scripts/ctl.sh
  56. LIBREOFFICE_SCRIPT=$INSTALLDIR/libreoffice/scripts/ctl.sh
  57. #RUBY_APPLICATION_SCRIPT
  58. LUCENE_SCRIPT=$INSTALLDIR/lucene/scripts/ctl.sh
  59. ZOPE_SCRIPT=$INSTALLDIR/zope_application/scripts/ctl.sh
  60. THIRD_SCRIPT=$INSTALLDIR/third_application/scripts/ctl.sh
  61. POSTGRESQL_SCRIPT=$INSTALLDIR/postgresql/scripts/ctl.sh
  62. NAGIOS_SCRIPT=$INSTALLDIR/nagios/scripts/ctl.sh
  63. JETTY_SCRIPT=$INSTALLDIR/jetty/scripts/ctl.sh
  64. JBOSS_SCRIPT=$INSTALLDIR/jboss/scripts/ctl.sh
  65. WILDFLY_SCRIPT=$INSTALLDIR/wildfly/scripts/ctl.sh
  66. MEMCACHED_SCRIPT=$INSTALLDIR/memcached/scripts/ctl.sh
  67. RABBITMQ_SCRIPT=$INSTALLDIR/rabbitmq/scripts/ctl.sh
  68. ACTIVEMQ_SCRIPT=$INSTALLDIR/activemq/scripts/ctl.sh
  69.  
  70. help() {
  71. echo "usage: $0 help"
  72. echo " $0 (start|stop|restart|status)"
  73. if test -x $MARIADB_SCRIPT; then
  74. echo " $0 (start|stop|restart|status) mariadb"
  75. fi
  76. if test -x $MYSQL_SCRIPT; then
  77. echo " $0 (start|stop|restart|status) mysql"
  78. fi
  79. if test -x $POSTGRESQL_SCRIPT; then
  80. echo " $0 (start|stop|restart|status) postgresql"
  81. fi
  82. if test -x $MONGODB_SCRIPT; then
  83. echo " $0 (start|stop|restart|status) mongodb"
  84. fi
  85. if test -x $CASSANDRA_SCRIPT; then
  86. echo " $0 (start|stop|restart|status) cassandra"
  87. fi
  88. if test -x $COUCHDB_SCRIPT; then
  89. echo " $0 (start|stop|restart|status) couchdb"
  90. fi
  91. if test -x $INGRES_SCRIPT; then
  92. echo " $0 (start|stop|restart|status) ingres"
  93. fi
  94. if test -x $MEMCACHED_SCRIPT; then
  95. echo " $0 (start|stop|restart|status) memcached"
  96. fi
  97. if test -x $PHPFPM_SCRIPT; then
  98. echo " $0 (start|stop|restart|status) php-fpm"
  99. fi
  100. if test -x $HHVM_SCRIPT; then
  101. echo " $0 (start|stop|restart|status) hhvm"
  102. fi
  103. if test -x $APACHE_SCRIPT; then
  104. echo " $0 (start|stop|restart|status) apache"
  105. fi
  106. if test -x $VARNISH_SCRIPT; then
  107. echo " $0 (start|stop|restart|status) varnish"
  108. fi
  109. if test -x $NGINX_SCRIPT; then
  110. echo " $0 (start|stop|restart|status) nginx"
  111. fi
  112. if test -x $HYPERSONIC_SCRIPT; then
  113. echo " $0 (start|stop|restart|status) hypersonic"
  114. fi
  115. if test -x $SOLR_SCRIPT; then
  116. echo " $0 (start|stop|restart|status) solr"
  117. fi
  118. if test -x $ELASTICSEARCH_SCRIPT; then
  119. echo " $0 (start|stop|restart|status) elasticsearch"
  120. fi
  121. if test -x $LOGSTASH_SCRIPT; then
  122. echo " $0 (start|stop|restart|status) logstash"
  123. fi
  124. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  125. echo " $0 (start|stop|restart|status) logstash-forwarder"
  126. fi
  127. if test -x $KIBANA_SCRIPT; then
  128. echo " $0 (start|stop|restart|status) kibana"
  129. fi
  130. if test -x $TOMCAT_SCRIPT; then
  131. echo " $0 (start|stop|restart|status) tomcat"
  132. fi
  133. if test -x $RESIN_SCRIPT; then
  134. echo " $0 (start|stop|restart|status) resin"
  135. fi
  136. if test -x $REDIS_SCRIPT; then
  137. echo " $0 (start|stop|restart|status) redis"
  138. fi
  139. if test -x $SUBVERSION_SCRIPT; then
  140. echo " $0 (start|stop|restart|status) subversion"
  141. fi
  142. if test -x $LIBREOFFICE_SCRIPT; then
  143. echo " $0 (start|stop|restart|status) libreoffice"
  144. fi
  145. #RUBY_APPLICATION_HELP
  146. if test -x $LUCENE_SCRIPT; then
  147. echo " $0 (start|stop|restart|status) lucene"
  148. fi
  149. if test -x $RABBITMQ_SCRIPT; then
  150. echo " $0 (start|stop|restart|status) rabbitmq"
  151. fi
  152. if test -x $ACTIVEMQ_SCRIPT; then
  153. echo " $0 (start|stop|restart|status) activemq"
  154. fi
  155. if test -x $ZOPE_SCRIPT; then
  156. echo " $0 (start|stop|restart|status) zope_application"
  157. fi
  158. if test -x $THIRD_SCRIPT; then
  159. echo " $0 (start|stop|restart|status) third_application"
  160. fi
  161. if test -x $NAGIOS_SCRIPT; then
  162. echo " $0 (start|stop|restart|status) nagios"
  163. fi
  164. if test -x $JETTY_SCRIPT; then
  165. echo " $0 (start|stop|restart|status) jetty"
  166. fi
  167. if test -x $JBOSS_SCRIPT; then
  168. echo " $0 (start|stop|restart|status) jboss"
  169. fi
  170. if test -x $WILDFLY_SCRIPT; then
  171. echo " $0 (start|stop|restart|status) wildfly"
  172. fi
  173. cat <<EOF
  174.  
  175. help - this screen
  176. start - start the service(s)
  177. stop - stop the service(s)
  178. restart - restart or start the service(s)
  179. status - show the status of the service(s)
  180.  
  181. EOF
  182. }
  183.  
  184.  
  185. # Disable Monit
  186. if [ -f "$INSTALLDIR/config/monit/bitnami.conf" ] && [ `id -u` = 0 ] && [ `which monit 2> /dev/null` ] && ( [ "x$1" = "xstop" ] || [ "x$1" = "xrestart" ] ); then
  187. if [ "x$2" = "x" ]; then
  188. env -i monit unmonitor all
  189. elif [ -f "$INSTALLDIR/config/monit/conf.d/$2.conf" ]; then
  190. env -i monit unmonitor $2
  191. fi
  192. fi
  193.  
  194.  
  195. if [ "x$1" = "xhelp" ] || [ "x$1" = "x" ]; then
  196. help
  197. elif [ "x$1" = "xstart" ]; then
  198.  
  199. if [ "x$2" = "xmariadb" ]; then
  200. if test -x $MARIADB_SCRIPT; then
  201. $MARIADB_SCRIPT start
  202. MARIADB_ERROR=$?
  203. fi
  204. elif [ "x$2" = "xmysql" ]; then
  205. if test -x $MYSQL_SCRIPT; then
  206. $MYSQL_SCRIPT start
  207. MYSQL_ERROR=$?
  208. fi
  209. elif [ "x$2" = "xpostgresql" ]; then
  210. if test -x $POSTGRESQL_SCRIPT; then
  211. $POSTGRESQL_SCRIPT start
  212. POSTGRESQL_ERROR=$?
  213. fi
  214. elif [ "x$2" = "xmongodb" ]; then
  215. if test -x $MONGODB_SCRIPT; then
  216. $MONGODB_SCRIPT start
  217. MONGODB_ERROR=$?
  218. fi
  219. elif [ "x$2" = "xcassandra" ]; then
  220. if test -x $CASSANDRA_SCRIPT; then
  221. $CASSANDRA_SCRIPT start
  222. CASSANDRA_ERROR=$?
  223. fi
  224. elif [ "x$2" = "xcouchdb" ]; then
  225. if test -x $COUCHDB_SCRIPT; then
  226. $COUCHDB_SCRIPT start
  227. COUCHDB_ERROR=$?
  228. fi
  229. elif [ "x$2" = "xingres" ]; then
  230. if test -x $INGRES_SCRIPT; then
  231. $INGRES_SCRIPT start
  232. INGRES_ERROR=$?
  233. fi
  234. elif [ "x$2" = "xlibreoffice" ]; then
  235. if test -x $LIBREOFFICE_SCRIPT; then
  236. $LIBREOFFICE_SCRIPT start
  237. LIBREOFFICE_ERROR=$?
  238. fi
  239. elif [ "x$2" = "xhypersonic" ]; then
  240. if test -x $HYPERSONIC_SCRIPT; then
  241. $HYPERSONIC_SCRIPT start
  242. HYPERSONIC_ERROR=$?
  243. fi
  244. elif [ "x$2" = "xmemcached" ]; then
  245. if test -x $MEMCACHED_SCRIPT; then
  246. $MEMCACHED_SCRIPT start
  247. MEMCACHED_ERROR=$?
  248. fi
  249. elif [ "x$2" = "xsolr" ]; then
  250. if test -x $SOLR_SCRIPT; then
  251. $SOLR_SCRIPT start
  252. SOLR_ERROR=$?
  253. fi
  254. elif [ "x$2" = "xelasticsearch" ]; then
  255. if test -x $ELASTICSEARCH_SCRIPT; then
  256. $ELASTICSEARCH_SCRIPT start
  257. ELASTICSEARCH_ERROR=$?
  258. fi
  259. elif [ "x$2" = "xlogstash" ]; then
  260. if test -x $LOGSTASH_SCRIPT; then
  261. $LOGSTASH_SCRIPT start
  262. LOGSTASH_ERROR=$?
  263. fi
  264. elif [ "x$2" = "xlogstash-forwarder" ]; then
  265. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  266. $LOGSTASHFORWARDER_SCRIPT start
  267. LOGSTASHFORWARDER_ERROR=$?
  268. fi
  269. elif [ "x$2" = "xkibana" ]; then
  270. if test -x $KIBANA_SCRIPT; then
  271. $KIBANA_SCRIPT start
  272. KIBANA_ERROR=$?
  273. fi
  274. elif [ "x$2" = "xtomcat" ]; then
  275. if test -x $TOMCAT_SCRIPT; then
  276. $TOMCAT_SCRIPT start
  277. TOMCAT_ERROR=$?
  278. fi
  279. elif [ "x$2" = "xjboss" ]; then
  280. if test -x $JBOSS_SCRIPT; then
  281. $JBOSS_SCRIPT start
  282. JBOSS_ERROR=$?
  283. fi
  284. elif [ "x$2" = "xwildfly" ]; then
  285. if test -x $WILDFLY_SCRIPT; then
  286. $WILDFLY_SCRIPT start
  287. WILDFLY_ERROR=$?
  288. fi
  289. elif [ "x$2" = "xresin" ]; then
  290. if test -x $RESIN_SCRIPT; then
  291. $RESIN_SCRIPT start
  292. RESIN_ERROR=$?
  293. fi
  294. elif [ "x$2" = "xredis" ]; then
  295. if test -x $REDIS_SCRIPT; then
  296. $REDIS_SCRIPT start
  297. REDIS_ERROR=$?
  298. fi
  299. #RUBY_APPLICATION_START
  300. elif [ "x$2" = "xrabbitmq" ]; then
  301. if test -x $RABBITMQ_SCRIPT; then
  302. $RABBITMQ_SCRIPT start
  303. RABBITMQ_ERROR=$?
  304. fi
  305. elif [ "x$2" = "xactivemq" ]; then
  306. if test -x $ACTIVEMQ_SCRIPT; then
  307. $ACTIVEMQ_SCRIPT start
  308. ACTIVEMQ_ERROR=$?
  309. fi
  310. elif [ "x$2" = "xzope_application" ]; then
  311. if test -x $ZOPE_SCRIPT; then
  312. $ZOPE_SCRIPT start
  313. ZOPE_ERROR=$?
  314. fi
  315. elif [ "x$2" = "xlucene" ]; then
  316. if test -x $LUCENE_SCRIPT; then
  317. $LUCENE_SCRIPT start
  318. LUCENE_ERROR=$?
  319. fi
  320. elif [ "x$2" = "xvarnish" ]; then
  321. if test -x $VARNISH_SCRIPT; then
  322. $VARNISH_SCRIPT start
  323. VARNISH_ERROR=$?
  324. fi
  325. elif [ "x$2" = "xphp-fpm" ]; then
  326. if test -x $PHPFPM_SCRIPT; then
  327. $PHPFPM_SCRIPT start
  328. PHPFPM_ERROR=$?
  329. fi
  330. elif [ "x$2" = "xhhvm" ]; then
  331. if test -x $HHVM_SCRIPT; then
  332. $HHVM_SCRIPT start
  333. HHVM_ERROR=$?
  334. fi
  335. elif [ "x$2" = "xapache" ]; then
  336. if test -x $APACHE_SCRIPT; then
  337. $APACHE_SCRIPT start
  338. APACHE_ERROR=$?
  339. fi
  340. elif [ "x$2" = "xnginx" ]; then
  341. if test -x $NGINX_SCRIPT; then
  342. $NGINX_SCRIPT start
  343. NGINX_ERROR=$?
  344. fi
  345. elif [ "x$2" = "xsubversion" ]; then
  346. if test -x $SUBVERSION_SCRIPT; then
  347. $SUBVERSION_SCRIPT start
  348. SUBVERSION_ERROR=$?
  349. fi
  350. elif [ "x$2" = "xthird_application" ]; then
  351. if test -x $THIRD_SCRIPT; then
  352. $THIRD_SCRIPT start
  353. THIRD_ERROR=$?
  354. fi
  355. elif [ "x$2" = "xnagios" ]; then
  356. if test -x $NAGIOS_SCRIPT; then
  357. $NAGIOS_SCRIPT start
  358. NAGIOS_ERROR=$?
  359. fi
  360. elif [ "x$2" = "xjetty" ]; then
  361. if test -x $JETTY_SCRIPT; then
  362. $JETTY_SCRIPT start
  363. JETTY_ERROR=$?
  364. fi
  365. elif [ "x$2" = "x" ]; then
  366. if test -x $MARIADB_SCRIPT; then
  367. $MARIADB_SCRIPT start
  368. MARIADB_ERROR=$?
  369. sleep 5
  370. fi
  371. if test -x $MYSQL_SCRIPT; then
  372. $MYSQL_SCRIPT start
  373. MYSQL_ERROR=$?
  374. sleep 5
  375. fi
  376. if test -x $POSTGRESQL_SCRIPT; then
  377. $POSTGRESQL_SCRIPT start
  378. POSTGRESQL_ERROR=$?
  379. sleep 5
  380. fi
  381. if test -x $MONGODB_SCRIPT; then
  382. $MONGODB_SCRIPT start
  383. MONGODB_ERROR=$?
  384. sleep 2
  385. fi
  386. if test -x $CASSANDRA_SCRIPT; then
  387. $CASSANDRA_SCRIPT start
  388. CASSANDRA_ERROR=$?
  389. sleep 2
  390. fi
  391. if test -x $COUCHDB_SCRIPT; then
  392. $COUCHDB_SCRIPT start
  393. COUCHDB_ERROR=$?
  394. sleep 2
  395. fi
  396. if test -x $INGRES_SCRIPT; then
  397. $INGRES_SCRIPT start
  398. INGRES_ERROR=$?
  399. sleep 5
  400. fi
  401.  
  402. if test -x $LIBREOFFICE_SCRIPT; then
  403. $LIBREOFFICE_SCRIPT start
  404. LIBREOFFICE_ERROR=$?
  405. fi
  406.  
  407. if test -x $HYPERSONIC_SCRIPT; then
  408. $HYPERSONIC_SCRIPT start
  409. HYPERSONIC_ERROR=$?
  410. fi
  411.  
  412. if test -x $MEMCACHED_SCRIPT; then
  413. $MEMCACHED_SCRIPT start
  414. MEMCACHED_ERROR=$?
  415. fi
  416.  
  417. if test -x $SOLR_SCRIPT; then
  418. $SOLR_SCRIPT start
  419. SOLR_ERROR=$?
  420. fi
  421.  
  422. if test -x $ELASTICSEARCH_SCRIPT; then
  423. $ELASTICSEARCH_SCRIPT start
  424. ELASTICSEARCH_ERROR=$?
  425. fi
  426.  
  427. if test -x $LOGSTASH_SCRIPT; then
  428. $LOGSTASH_SCRIPT start
  429. LOGSTASH_ERROR=$?
  430. fi
  431.  
  432. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  433. $LOGSTASHFORWARDER_SCRIPT start
  434. LOGSTASHFORWARDER_ERROR=$?
  435. fi
  436.  
  437. if test -x $KIBANA_SCRIPT; then
  438. $KIBANA_SCRIPT start
  439. KIBANA_ERROR=$?
  440. fi
  441.  
  442. if test -x $TOMCAT_SCRIPT; then
  443. $TOMCAT_SCRIPT start
  444. TOMCAT_ERROR=$?
  445. fi
  446.  
  447. if test -x $JBOSS_SCRIPT; then
  448. $JBOSS_SCRIPT start
  449. JBOSS_ERROR=$?
  450. fi
  451. if test -x $WILDFLY_SCRIPT; then
  452. $WILDFLY_SCRIPT start
  453. WILDFLY_ERROR=$?
  454. fi
  455. if test -x $RESIN_SCRIPT; then
  456. $RESIN_SCRIPT start
  457. RESIN_ERROR=$?
  458. fi
  459. if test -x $REDIS_SCRIPT; then
  460. $REDIS_SCRIPT start
  461. REDIS_ERROR=$?
  462. fi
  463. #RUBY_APPLICATION_GENERIC_START
  464.  
  465. if test -x $RABBITMQ_SCRIPT; then
  466. $RABBITMQ_SCRIPT start
  467. RABBITMQ_ERROR=$?
  468. fi
  469. if test -x $ACTIVEMQ_SCRIPT; then
  470. $ACTIVEMQ_SCRIPT start
  471. ACTIVEMQ_ERROR=$?
  472. fi
  473. if test -x $ZOPE_SCRIPT; then
  474. $ZOPE_SCRIPT start
  475. ZOPE_ERROR=$?
  476. fi
  477.  
  478. if test -x $LUCENE_SCRIPT; then
  479. $LUCENE_SCRIPT start
  480. LUCENE_ERROR=$?
  481. fi
  482. if test -x $PHPFPM_SCRIPT; then
  483. $PHPFPM_SCRIPT start
  484. PHPFPM_ERROR=$?
  485. fi
  486. if test -x $HHVM_SCRIPT; then
  487. $HHVM_SCRIPT start
  488. HHVM_ERROR=$?
  489. fi
  490. if test -x $APACHE_SCRIPT; then
  491. $APACHE_SCRIPT start
  492. APACHE_ERROR=$?
  493. fi
  494. if test -x $VARNISH_SCRIPT; then
  495. $VARNISH_SCRIPT start
  496. VARNISH_ERROR=$?
  497. fi
  498. if test -x $NGINX_SCRIPT; then
  499. $NGINX_SCRIPT start
  500. NGINX_ERROR=$?
  501. fi
  502.  
  503. if test -x $SUBVERSION_SCRIPT; then
  504. $SUBVERSION_SCRIPT start
  505. SUBVERSION_ERROR=$?
  506. fi
  507. if test -x $THIRD_SCRIPT; then
  508. $THIRD_SCRIPT start
  509. THIRD_ERROR=$?
  510. fi
  511. if test -x $NAGIOS_SCRIPT; then
  512. $NAGIOS_SCRIPT start
  513. NAGIOS_ERROR=$?
  514. fi
  515. if test -x $JETTY_SCRIPT; then
  516. $JETTY_SCRIPT start
  517. JETTY_ERROR=$?
  518. fi
  519. else
  520. help
  521. fi
  522.  
  523.  
  524. elif [ "x$1" = "xstop" ]; then
  525.  
  526. if [ "x$2" = "xmariadb" ]; then
  527. if test -x $MARIADB_SCRIPT; then
  528. $MARIADB_SCRIPT stop
  529. MARIADB_ERROR=$?
  530. sleep 2
  531. fi
  532. elif [ "x$2" = "xmysql" ]; then
  533. if test -x $MYSQL_SCRIPT; then
  534. $MYSQL_SCRIPT stop
  535. MYSQL_ERROR=$?
  536. sleep 2
  537. fi
  538. elif [ "x$2" = "xpostgresql" ]; then
  539. if test -x $POSTGRESQL_SCRIPT; then
  540. $POSTGRESQL_SCRIPT stop
  541. POSTGRESQL_ERROR=$?
  542. sleep 5
  543. fi
  544. elif [ "x$2" = "xmongodb" ]; then
  545. if test -x $MONGODB_SCRIPT; then
  546. $MONGODB_SCRIPT stop
  547. MONGODB_ERROR=$?
  548. sleep 2
  549. fi
  550. elif [ "x$2" = "xcassandra" ]; then
  551. if test -x $CASSANDRA_SCRIPT; then
  552. $CASSANDRA_SCRIPT stop
  553. CASSANDRA_ERROR=$?
  554. sleep 2
  555. fi
  556. elif [ "x$2" = "xcouchdb" ]; then
  557. if test -x $COUCHDB_SCRIPT; then
  558. $COUCHDB_SCRIPT stop
  559. COUCHDB_ERROR=$?
  560. sleep 2
  561. fi
  562. elif [ "x$2" = "xingres" ]; then
  563. if test -x $INGRES_SCRIPT; then
  564. $INGRES_SCRIPT stop
  565. INGRES_ERROR=$?
  566. sleep 5
  567. fi
  568. elif [ "x$2" = "xlibreoffice" ]; then
  569. if test -x $LIBREOFFICE_SCRIPT; then
  570. $LIBREOFFICE_SCRIPT stop
  571. LIBREOFFICE_ERROR=$?
  572. fi
  573. elif [ "x$2" = "xhypersonic" ]; then
  574. if test -x $HYPERSONIC_SCRIPT; then
  575. $HYPERSONIC_SCRIPT stop
  576. HYPERSONIC_ERROR=$?
  577. fi
  578. elif [ "x$2" = "xmemcached" ]; then
  579. if test -x $MEMCACHED_SCRIPT; then
  580. $MEMCACHED_SCRIPT stop
  581. MEMCACHED_ERROR=$?
  582. fi
  583. elif [ "x$2" = "xsolr" ]; then
  584. if test -x $SOLR_SCRIPT; then
  585. $SOLR_SCRIPT stop
  586. SOLR_ERROR=$?
  587. fi
  588. elif [ "x$2" = "xelasticsearch" ]; then
  589. if test -x $ELASTICSEARCH_SCRIPT; then
  590. $ELASTICSEARCH_SCRIPT stop
  591. ELASTICSEARCH_ERROR=$?
  592. fi
  593. elif [ "x$2" = "xlogstash" ]; then
  594. if test -x $LOGSTASH_SCRIPT; then
  595. $LOGSTASH_SCRIPT stop
  596. LOGSTASH_ERROR=$?
  597. fi
  598. elif [ "x$2" = "xlogstash-forwarder" ]; then
  599. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  600. $LOGSTASHFORWARDER_SCRIPT stop
  601. LOGSTASHFORWARDER_ERROR=$?
  602. fi
  603. elif [ "x$2" = "xkibana" ]; then
  604. if test -x $KIBANA_SCRIPT; then
  605. $KIBANA_SCRIPT stop
  606. KIBANA_ERROR=$?
  607. fi
  608. elif [ "x$2" = "xtomcat" ]; then
  609. if test -x $TOMCAT_SCRIPT; then
  610. $TOMCAT_SCRIPT stop
  611. TOMCAT_ERROR=$?
  612. fi
  613. elif [ "x$2" = "xresin" ]; then
  614. if test -x $RESIN_SCRIPT; then
  615. $RESIN_SCRIPT stop
  616. RESIN_ERROR=$?
  617. fi
  618. elif [ "x$2" = "xredis" ]; then
  619. if test -x $REDIS_SCRIPT; then
  620. $REDIS_SCRIPT stop
  621. REDIS_ERROR=$?
  622. fi
  623. #RUBY_APPLICATION_STOP
  624. elif [ "x$2" = "xrabbitmq" ]; then
  625. if test -x $RABBITMQ_SCRIPT; then
  626. $RABBITMQ_SCRIPT stop
  627. RABBITMQ_ERROR=$?
  628. fi
  629. elif [ "x$2" = "xactivemq" ]; then
  630. if test -x $ACTIVEMQ_SCRIPT; then
  631. $ACTIVEMQ_SCRIPT stop
  632. ACTIVEMQ_ERROR=$?
  633. fi
  634. elif [ "x$2" = "xzope_application" ]; then
  635. if test -x $ZOPE_SCRIPT; then
  636. $ZOPE_SCRIPT stop
  637. ZOPE_ERROR=$?
  638. fi
  639. elif [ "x$2" = "xlucene" ]; then
  640. if test -x $LUCENE_SCRIPT; then
  641. $LUCENE_SCRIPT stop
  642. LUCENE_ERROR=$?
  643. fi
  644. elif [ "x$2" = "xnginx" ]; then
  645. if test -x $NGINX_SCRIPT; then
  646. $NGINX_SCRIPT stop
  647. NGINX_ERROR=$?
  648. fi
  649. elif [ "x$2" = "xapache" ]; then
  650. if test -x $APACHE_SCRIPT; then
  651. $APACHE_SCRIPT stop
  652. APACHE_ERROR=$?
  653. fi
  654. elif [ "x$2" = "xhhvm" ]; then
  655. if test -x $HHVM_SCRIPT; then
  656. $HHVM_SCRIPT stop
  657. HHVM_ERROR=$?
  658. fi
  659. elif [ "x$2" = "xphp-fpm" ]; then
  660. if test -x $PHPFPM_SCRIPT; then
  661. $PHPFPM_SCRIPT stop
  662. PHPFPM_ERROR=$?
  663. fi
  664. elif [ "x$2" = "xvarnish" ]; then
  665. if test -x $VARNISH_SCRIPT; then
  666. $VARNISH_SCRIPT stop
  667. VARNISH_ERROR=$?
  668. fi
  669.  
  670. elif [ "x$2" = "xsubversion" ]; then
  671. if test -x $SUBVERSION_SCRIPT; then
  672. $SUBVERSION_SCRIPT stop
  673. SUBVERSION_ERROR=$?
  674. fi
  675. elif [ "x$2" = "xthird_application" ]; then
  676. if test -x $THIRD_SCRIPT; then
  677. $THIRD_SCRIPT stop
  678. THIRD_ERROR=$?
  679. fi
  680. elif [ "x$2" = "xnagios" ]; then
  681. if test -x $NAGIOS_SCRIPT; then
  682. $NAGIOS_SCRIPT stop
  683. NAGIOS_ERROR=$?
  684. fi
  685. elif [ "x$2" = "xjetty" ]; then
  686. if test -x $JETTY_SCRIPT; then
  687. $JETTY_SCRIPT stop
  688. JETTY_ERROR=$?
  689. fi
  690. elif [ "x$2" = "xjboss" ]; then
  691. if test -x $JBOSS_SCRIPT; then
  692. $JBOSS_SCRIPT stop
  693. JBOSS_ERROR=$?
  694. fi
  695. elif [ "x$2" = "xwildfly" ]; then
  696. if test -x $WILDFLY_SCRIPT; then
  697. $WILDFLY_SCRIPT stop
  698. WILDFLY_ERROR=$?
  699. fi
  700. elif [ "x$2" = "x" ]; then
  701. if test -x $HYPERSONIC_SCRIPT; then
  702. $HYPERSONIC_SCRIPT stop
  703. HYPERSONIC_ERROR=$?
  704. fi
  705. if test -x $JBOSS_SCRIPT; then
  706. $JBOSS_SCRIPT stop
  707. JBOSS_ERROR=$?
  708. fi
  709. if test -x $WILDFLY_SCRIPT; then
  710. $WILDFLY_SCRIPT stop
  711. WILDFLY_ERROR=$?
  712. fi
  713. if test -x $JETTY_SCRIPT; then
  714. $JETTY_SCRIPT stop
  715. JETTY_ERROR=$?
  716. fi
  717. if test -x $NAGIOS_SCRIPT; then
  718. $NAGIOS_SCRIPT stop
  719. NAGIOS_ERROR=$?
  720. fi
  721. if test -x $THIRD_SCRIPT; then
  722. $THIRD_SCRIPT stop
  723. THIRD_ERROR=$?
  724. fi
  725. if test -x $SUBVERSION_SCRIPT; then
  726. $SUBVERSION_SCRIPT stop
  727. SUBVERSION_ERROR=$?
  728. fi
  729. if test -x $NGINX_SCRIPT; then
  730. $NGINX_SCRIPT stop
  731. NGINX_ERROR=$?
  732. fi
  733. if test -x $APACHE_SCRIPT; then
  734. $APACHE_SCRIPT stop
  735. APACHE_ERROR=$?
  736. fi
  737. if test -x $PHPFPM_SCRIPT; then
  738. $PHPFPM_SCRIPT stop
  739. PHPFPM_ERROR=$?
  740. fi
  741. if test -x $HHVM_SCRIPT; then
  742. $HHVM_SCRIPT stop
  743. HHVM_ERROR=$?
  744. fi
  745. if test -x $VARNISH_SCRIPT; then
  746. $VARNISH_SCRIPT stop
  747. VARNISH_ERROR=$?
  748. sleep 3
  749. fi
  750. #RUBY_APPLICATION_GENERIC_STOP
  751.  
  752. if test -x $ZOPE_SCRIPT; then
  753. $ZOPE_SCRIPT stop
  754. ZOPE_ERROR=$?
  755. fi
  756. if test -x $RABBITMQ_SCRIPT; then
  757. $RABBITMQ_SCRIPT stop
  758. RABBITMQ_ERROR=$?
  759. fi
  760. if test -x $ACTIVEMQ_SCRIPT; then
  761. $ACTIVEMQ_SCRIPT stop
  762. ACTIVEMQ_ERROR=$?
  763. fi
  764. if test -x $LUCENE_SCRIPT; then
  765. $LUCENE_SCRIPT stop
  766. LUCENE_ERROR=$?
  767. fi
  768. if test -x $SOLR_SCRIPT; then
  769. $SOLR_SCRIPT stop
  770. SOLR_ERROR=$?
  771. sleep 3
  772. fi
  773. if test -x $ELASTICSEARCH_SCRIPT; then
  774. $ELASTICSEARCH_SCRIPT stop
  775. ELASTICSEARCH_ERROR=$?
  776. fi
  777. if test -x $LOGSTASH_SCRIPT; then
  778. $LOGSTASH_SCRIPT stop
  779. LOGSTASH_ERROR=$?
  780. fi
  781. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  782. $LOGSTASHFORWARDER_SCRIPT stop
  783. LOGSTASHFORWARDER_ERROR=$?
  784. fi
  785. if test -x $KIBANA_SCRIPT; then
  786. $KIBANA_SCRIPT stop
  787. KIBANA_ERROR=$?
  788. fi
  789. if test -x $TOMCAT_SCRIPT; then
  790. $TOMCAT_SCRIPT stop
  791. TOMCAT_ERROR=$?
  792. sleep 3
  793. fi
  794. if test -x $RESIN_SCRIPT; then
  795. $RESIN_SCRIPT stop
  796. RESIN_ERROR=$?
  797. sleep 3
  798. fi
  799. if test -x $REDIS_SCRIPT; then
  800. $REDIS_SCRIPT stop
  801. REDIS_ERROR=$?
  802. sleep 3
  803. fi
  804. if test -x $MEMCACHED_SCRIPT; then
  805. $MEMCACHED_SCRIPT stop
  806. MEMCACHED_ERROR=$?
  807. fi
  808. if test -x $LIBREOFFICE_SCRIPT; then
  809. $LIBREOFFICE_SCRIPT stop
  810. LIBREOFFICE_ERROR=$?
  811. fi
  812. if test -x $MARIADB_SCRIPT; then
  813. $MARIADB_SCRIPT stop
  814. MARIADB_ERROR=$?
  815. fi
  816. if test -x $MYSQL_SCRIPT; then
  817. $MYSQL_SCRIPT stop
  818. MYSQL_ERROR=$?
  819. fi
  820. if test -x $MONGODB_SCRIPT; then
  821. $MONGODB_SCRIPT stop
  822. MONGODB_ERROR=$?
  823. fi
  824. if test -x $CASSANDRA_SCRIPT; then
  825. $CASSANDRA_SCRIPT stop
  826. CASSANDRA_ERROR=$?
  827. fi
  828. if test -x $COUCHDB_SCRIPT; then
  829. $COUCHDB_SCRIPT stop
  830. COUCHDB_ERROR=$?
  831. fi
  832. if test -x $INGRES_SCRIPT; then
  833. $INGRES_SCRIPT stop
  834. INGRES_ERROR=$?
  835. fi
  836. if test -x $POSTGRESQL_SCRIPT; then
  837. $POSTGRESQL_SCRIPT stop
  838. POSTGRESQL_ERROR=$?
  839. fi
  840. else
  841. help
  842. fi
  843.  
  844. elif [ "x$1" = "xrestart" ]; then
  845.  
  846. if [ "x$2" = "xmariadb" ]; then
  847. if test -x $MARIADB_SCRIPT; then
  848. $MARIADB_SCRIPT stop
  849. sleep 2
  850. $MARIADB_SCRIPT start
  851. MARIADB_ERROR=$?
  852. fi
  853. elif [ "x$2" = "xmysql" ]; then
  854. if test -x $MYSQL_SCRIPT; then
  855. $MYSQL_SCRIPT stop
  856. sleep 2
  857. $MYSQL_SCRIPT start
  858. MYSQL_ERROR=$?
  859. fi
  860. elif [ "x$2" = "xpostgresql" ]; then
  861. if test -x $POSTGRESQL_SCRIPT; then
  862. $POSTGRESQL_SCRIPT stop
  863. sleep 5
  864. $POSTGRESQL_SCRIPT start
  865. POSTGRESQL_ERROR=$?
  866. fi
  867. elif [ "x$2" = "xmongodb" ]; then
  868. if test -x $MONGODB_SCRIPT; then
  869. $MONGODB_SCRIPT stop
  870. sleep 2
  871. $MONGODB_SCRIPT start
  872. MONGODB_ERROR=$?
  873. fi
  874. elif [ "x$2" = "xcassandra" ]; then
  875. if test -x $CASSANDRA_SCRIPT; then
  876. $CASSANDRA_SCRIPT stop
  877. sleep 2
  878. $CASSANDRA_SCRIPT start
  879. CASSANDRA_ERROR=$?
  880. fi
  881. elif [ "x$2" = "xcouchdb" ]; then
  882. if test -x $COUCHDB_SCRIPT; then
  883. $COUCHDB_SCRIPT stop
  884. sleep 2
  885. $COUCHDB_SCRIPT start
  886. COUCHDB_ERROR=$?
  887. fi
  888. elif [ "x$2" = "xingres" ]; then
  889. if test -x $INGRES_SCRIPT; then
  890. $INGRES_SCRIPT stop
  891. sleep 5
  892. $INGRES_SCRIPT start
  893. INGRES_ERROR=$?
  894. fi
  895. elif [ "x$2" = "xlibreoffice" ]; then
  896. if test -x $LIBREOFFICE_SCRIPT; then
  897. $LIBREOFFICE_SCRIPT stop
  898. sleep 2
  899. $LIBREOFFICE_SCRIPT start
  900. LIBREOFFICE_ERROR=$?
  901. fi
  902. elif [ "x$2" = "xhypersonic" ]; then
  903. if test -x $HYPERSONIC_SCRIPT; then
  904. $HYPERSONIC_SCRIPT stop
  905. sleep 2
  906. $HYPERSONIC_SCRIPT start
  907. HYPERSONIC_ERROR=$?
  908. fi
  909. elif [ "x$2" = "xmemcached" ]; then
  910. if test -x $MEMCACHED_SCRIPT; then
  911. $MEMCACHED_SCRIPT stop
  912. $MEMCACHED_SCRIPT start
  913. MEMCACHED_ERROR=$?
  914. fi
  915. elif [ "x$2" = "xsolr" ]; then
  916. if test -x $SOLR_SCRIPT; then
  917. $SOLR_SCRIPT stop
  918. sleep 5
  919. $SOLR_SCRIPT start
  920. SOLR_ERROR=$?
  921. fi
  922. elif [ "x$2" = "xelasticsearch" ]; then
  923. if test -x $ELASTICSEARCH_SCRIPT; then
  924. $ELASTICSEARCH_SCRIPT stop
  925. sleep 3
  926. $ELASTICSEARCH_SCRIPT start
  927. ELASTICSEARCH_ERROR=$?
  928. fi
  929. elif [ "x$2" = "xlogstash" ]; then
  930. if test -x $LOGSTASH_SCRIPT; then
  931. $LOGSTASH_SCRIPT stop
  932. sleep 3
  933. $LOGSTASH_SCRIPT start
  934. LOGSTASH_ERROR=$?
  935. fi
  936. elif [ "x$2" = "xlogstash-forwarder" ]; then
  937. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  938. $LOGSTASHFORWARDER_SCRIPT stop
  939. sleep 3
  940. $LOGSTASHFORWARDER_SCRIPT start
  941. LOGSTASHFORWARDER_ERROR=$?
  942. fi
  943. elif [ "x$2" = "xkibana" ]; then
  944. if test -x $KIBANA_SCRIPT; then
  945. $KIBANA_SCRIPT stop
  946. sleep 3
  947. $KIBANA_SCRIPT start
  948. KIBANA_ERROR=$?
  949. fi
  950. elif [ "x$2" = "xtomcat" ]; then
  951. if test -x $TOMCAT_SCRIPT; then
  952. $TOMCAT_SCRIPT stop
  953. sleep 5
  954. $TOMCAT_SCRIPT start
  955. TOMCAT_ERROR=$?
  956. fi
  957. elif [ "x$2" = "xresin" ]; then
  958. if test -x $RESIN_SCRIPT; then
  959. $RESIN_SCRIPT stop
  960. sleep 5
  961. $RESIN_SCRIPT start
  962. RESIN_ERROR=$?
  963. fi
  964. elif [ "x$2" = "xredis" ]; then
  965. if test -x $REDIS_SCRIPT; then
  966. $REDIS_SCRIPT stop
  967. sleep 5
  968. $REDIS_SCRIPT start
  969. REDIS_ERROR=$?
  970. fi
  971. #RUBY_APPLICATION_RESTART
  972.  
  973. elif [ "x$2" = "xrabbitmq" ]; then
  974. if test -x $RABBITMQ_SCRIPT; then
  975. $RABBITMQ_SCRIPT stop
  976. sleep 2
  977. $RABBITMQ_SCRIPT start
  978. RABBITMQ_ERROR=$?
  979. fi
  980. elif [ "x$2" = "xactivemq" ]; then
  981. if test -x $ACTIVEMQ_SCRIPT; then
  982. $ACTIVEMQ_SCRIPT stop
  983. sleep 2
  984. $ACTIVEMQ_SCRIPT start
  985. ACTIVEMQ_ERROR=$?
  986. fi
  987. elif [ "x$2" = "xzope_application" ]; then
  988. if test -x $ZOPE_SCRIPT; then
  989. $ZOPE_SCRIPT stop
  990. sleep 2
  991. $ZOPE_SCRIPT start
  992. ZOPE_ERROR=$?
  993. fi
  994. elif [ "x$2" = "xlucene" ]; then
  995. if test -x $LUCENE_SCRIPT; then
  996. $LUCENE_SCRIPT stop
  997. sleep 2
  998. $LUCENE_SCRIPT start
  999. LUCENE_ERROR=$?
  1000. fi
  1001. elif [ "x$2" = "xphp-fpm" ]; then
  1002. if test -x $PHPFPM_SCRIPT; then
  1003. $PHPFPM_SCRIPT stop
  1004. sleep 2
  1005. $PHPFPM_SCRIPT start
  1006. PHPFPM_ERROR=$?
  1007. fi
  1008. elif [ "x$2" = "xhhvm" ]; then
  1009. if test -x $HHVM_SCRIPT; then
  1010. $HHVM_SCRIPT stop
  1011. sleep 2
  1012. $HHVM_SCRIPT start
  1013. HHVM_ERROR=$?
  1014. fi
  1015. elif [ "x$2" = "xapache" ]; then
  1016. if test -x $APACHE_SCRIPT; then
  1017. $APACHE_SCRIPT stop
  1018. sleep 2
  1019. $APACHE_SCRIPT start
  1020. APACHE_ERROR=$?
  1021. fi
  1022. elif [ "x$2" = "xvarnish" ]; then
  1023. if test -x $VARNISH_SCRIPT; then
  1024. $VARNISH_SCRIPT stop
  1025. sleep 5
  1026. $VARNISH_SCRIPT start
  1027. VARNISH_ERROR=$?
  1028. fi
  1029.  
  1030. elif [ "x$2" = "xnginx" ]; then
  1031. if test -x $NGINX_SCRIPT; then
  1032. $NGINX_SCRIPT stop
  1033. sleep 2
  1034. $NGINX_SCRIPT start
  1035. NGINX_ERROR=$?
  1036. fi
  1037. elif [ "x$2" = "xsubversion" ]; then
  1038. if test -x $SUBVERSION_SCRIPT; then
  1039. $SUBVERSION_SCRIPT stop
  1040. sleep 2
  1041. $SUBVERSION_SCRIPT start
  1042. SUBVERSION_ERROR=$?
  1043. fi
  1044. elif [ "x$2" = "xthird_application" ]; then
  1045. if test -x $THIRD_SCRIPT; then
  1046. $THIRD_SCRIPT stop
  1047. sleep 2
  1048. $THIRD_SCRIPT start
  1049. THIRD_ERROR=$?
  1050. fi
  1051. elif [ "x$2" = "xnagios" ]; then
  1052. if test -x $NAGIOS_SCRIPT; then
  1053. $NAGIOS_SCRIPT stop
  1054. sleep 2
  1055. $NAGIOS_SCRIPT start
  1056. NAGIOS_ERROR=$?
  1057. fi
  1058. elif [ "x$2" = "xjetty" ]; then
  1059. if test -x $JETTY_SCRIPT; then
  1060. $JETTY_SCRIPT stop
  1061. sleep 2
  1062. $JETTY_SCRIPT start
  1063. JETTY_ERROR=$?
  1064. fi
  1065. elif [ "x$2" = "xjboss" ]; then
  1066. if test -x $JBOSS_SCRIPT; then
  1067. $JBOSS_SCRIPT stop
  1068. sleep 2
  1069. $JBOSS_SCRIPT start
  1070. JBOSS_ERROR=$?
  1071. fi
  1072. elif [ "x$2" = "xwildfly" ]; then
  1073. if test -x $WILDFLY_SCRIPT; then
  1074. $WILDFLY_SCRIPT stop
  1075. sleep 2
  1076. $WILDFLY_SCRIPT start
  1077. WILDFLY_ERROR=$?
  1078. fi
  1079. elif [ "x$2" = "x" ]; then
  1080. if test -x $HYPERSONIC_SCRIPT; then
  1081. $HYPERSONIC_SCRIPT stop
  1082. HYPERSONIC_ERROR=$?
  1083. fi
  1084. if test -x $JBOSS_SCRIPT; then
  1085. $JBOSS_SCRIPT stop
  1086. JBOSS_ERROR=$?
  1087. fi
  1088. if test -x $WILDFLY_SCRIPT; then
  1089. $WILDFLY_SCRIPT stop
  1090. WILDFLY_ERROR=$?
  1091. fi
  1092. if test -x $JETTY_SCRIPT; then
  1093. $JETTY_SCRIPT stop
  1094. JETTY_ERROR=$?
  1095. fi
  1096. if test -x $NAGIOS_SCRIPT; then
  1097. $NAGIOS_SCRIPT stop
  1098. NAGIOS_ERROR=$?
  1099. fi
  1100. if test -x $THIRD_SCRIPT; then
  1101. $THIRD_SCRIPT stop
  1102. THIRD_ERROR=$?
  1103. fi
  1104. if test -x $SUBVERSION_SCRIPT; then
  1105. $SUBVERSION_SCRIPT stop
  1106. SUBVERSION_ERROR=$?
  1107. fi
  1108. if test -x $NGINX_SCRIPT; then
  1109. $NGINX_SCRIPT stop
  1110. NGINX_ERROR=$?
  1111. fi
  1112. if test -x $VARNISH_SCRIPT; then
  1113. $VARNISH_SCRIPT stop
  1114. VARNISH_ERROR=$?
  1115. fi
  1116. if test -x $APACHE_SCRIPT; then
  1117. $APACHE_SCRIPT stop
  1118. APACHE_ERROR=$?
  1119. fi
  1120. if test -x $PHPFPM_SCRIPT; then
  1121. $PHPFPM_SCRIPT stop
  1122. PHPFPM_ERROR=$?
  1123. fi
  1124. if test -x $HHVM_SCRIPT; then
  1125. $HHVM_SCRIPT stop
  1126. HHVM_ERROR=$?
  1127. fi
  1128. #RUBY_APPLICATION_GENERIC_STOP
  1129. if test -x $ZOPE_SCRIPT; then
  1130. $ZOPE_SCRIPT stop
  1131. ZOPE_ERROR=$?
  1132. fi
  1133. if test -x $LUCENE_SCRIPT; then
  1134. $LUCENE_SCRIPT stop
  1135. LUCENE_ERROR=$?
  1136. fi
  1137. if test -x $TOMCAT_SCRIPT; then
  1138. $TOMCAT_SCRIPT stop
  1139. TOMCAT_ERROR=$?
  1140. fi
  1141. if test -x $SOLR_SCRIPT; then
  1142. $SOLR_SCRIPT stop
  1143. SOLR_ERROR=$?
  1144. fi
  1145. if test -x $ELASTICSEARCH_SCRIPT; then
  1146. $ELASTICSEARCH_SCRIPT stop
  1147. ELASTICSEARCH_ERROR=$?
  1148. fi
  1149. if test -x $LOGSTASH_SCRIPT; then
  1150. $LOGSTASH_SCRIPT stop
  1151. LOGSTASH_ERROR=$?
  1152. fi
  1153. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  1154. $LOGSTASHFORWARDER_SCRIPT stop
  1155. LOGSTASHFORWARDER_ERROR=$?
  1156. fi
  1157. if test -x $KIBANA_SCRIPT; then
  1158. $KIBANA_SCRIPT stop
  1159. KIBANA_ERROR=$?
  1160. fi
  1161. if test -x $RESIN_SCRIPT; then
  1162. $RESIN_SCRIPT stop
  1163. RESIN_ERROR=$?
  1164. fi
  1165. if test -x $REDIS_SCRIPT; then
  1166. $REDIS_SCRIPT stop
  1167. REDIS_ERROR=$?
  1168. fi
  1169. if test -x $ACTIVEMQ_SCRIPT; then
  1170. $ACTIVEMQ_SCRIPT stop
  1171. ACTIVEMQ_ERROR=$?
  1172. fi
  1173. if test -x $MEMCACHED_SCRIPT; then
  1174. $MEMCACHED_SCRIPT stop
  1175. MEMCACHED_ERROR=$?
  1176. fi
  1177. if test -x $LIBREOFFICE_SCRIPT; then
  1178. $LIBREOFFICE_SCRIPT stop
  1179. LIBREOFFICE_ERROR=$?
  1180. fi
  1181. if test -x $MARIADB_SCRIPT; then
  1182. $MARIADB_SCRIPT stop
  1183. sleep 2
  1184. $MARIADB_SCRIPT start;
  1185. MARIADB_ERROR=$?
  1186. sleep 2
  1187. fi
  1188. if test -x $MYSQL_SCRIPT; then
  1189. $MYSQL_SCRIPT stop
  1190. sleep 2
  1191. $MYSQL_SCRIPT start;
  1192. MYSQL_ERROR=$?
  1193. sleep 2
  1194. fi
  1195. if test -x $POSTGRESQL_SCRIPT; then
  1196. $POSTGRESQL_SCRIPT stop
  1197. sleep 2
  1198. $POSTGRESQL_SCRIPT start;
  1199. POSTGRESQL_ERROR=$?
  1200. sleep 2
  1201. fi
  1202. if test -x $MONGODB_SCRIPT; then
  1203. $MONGODB_SCRIPT stop
  1204. sleep 2
  1205. $MONGODB_SCRIPT start;
  1206. MONGODB_ERROR=$?
  1207. sleep 2
  1208. fi
  1209. if test -x $CASSANDRA_SCRIPT; then
  1210. $CASSANDRA_SCRIPT stop
  1211. sleep 2
  1212. $CASSANDRA_SCRIPT start;
  1213. CASSANDRA_ERROR=$?
  1214. sleep 2
  1215. fi
  1216. if test -x $COUCHDB_SCRIPT; then
  1217. $COUCHDB_SCRIPT stop
  1218. sleep 2
  1219. $COUCHDB_SCRIPT start;
  1220. COUCHDB_ERROR=$?
  1221. sleep 2
  1222. fi
  1223. if test -x $INGRES_SCRIPT; then
  1224. $INGRES_SCRIPT stop
  1225. sleep 7
  1226. $INGRES_SCRIPT start;
  1227. INGRES_ERROR=$?
  1228. sleep 2
  1229. fi
  1230. if test -x $MEMCACHED_SCRIPT; then
  1231. $MEMCACHED_SCRIPT start
  1232. MEMCACHED_ERROR=$?
  1233. fi
  1234. if test -x $LIBREOFFICE_SCRIPT; then
  1235. $LIBREOFFICE_SCRIPT start
  1236. LIBREOFFICE_ERROR=$?
  1237. fi
  1238. if test -x $SOLR_SCRIPT; then
  1239. $SOLR_SCRIPT start
  1240. SOLR_ERROR=$?
  1241. fi
  1242. if test -x $ELASTICSEARCH_SCRIPT; then
  1243. $ELASTICSEARCH_SCRIPT start
  1244. ELASTICSEARCH_ERROR=$?
  1245. fi
  1246. if test -x $LOGSTASH_SCRIPT; then
  1247. $LOGSTASH_SCRIPT start
  1248. LOGSTASH_ERROR=$?
  1249. fi
  1250. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  1251. $LOGSTASHFORWARDER_SCRIPT start
  1252. LOGSTASHFORWARDER_ERROR=$?
  1253. fi
  1254. if test -x $KIBANA_SCRIPT; then
  1255. $KIBANA_SCRIPT start
  1256. KIBANA_ERROR=$?
  1257. fi
  1258. if test -x $TOMCAT_SCRIPT; then
  1259. $TOMCAT_SCRIPT start
  1260. TOMCAT_ERROR=$?
  1261. fi
  1262. if test -x $JBOSS_SCRIPT; then
  1263. $JBOSS_SCRIPT start
  1264. JBOSS_ERROR=$?
  1265. fi
  1266. if test -x $WILDFLY_SCRIPT; then
  1267. $WILDFLY_SCRIPT start
  1268. WILDFLY_ERROR=$?
  1269. fi
  1270. if test -x $RESIN_SCRIPT; then
  1271. $RESIN_SCRIPT start
  1272. RESIN_ERROR=$?
  1273. fi
  1274. if test -x $REDIS_SCRIPT; then
  1275. $REDIS_SCRIPT start
  1276. REDIS_ERROR=$?
  1277. fi
  1278. #RUBY_APPLICATION_GENERIC_START
  1279. if test -x $RABBITMQ_SCRIPT; then
  1280. $RABBITMQ_SCRIPT start
  1281. RABBITMQ_ERROR=$?
  1282. fi
  1283. if test -x $ACTIVEMQ_SCRIPT; then
  1284. $ACTIVEMQ_SCRIPT start
  1285. ACTIVEMQ_ERROR=$?
  1286. fi
  1287. if test -x $ZOPE_SCRIPT; then
  1288. $ZOPE_SCRIPT start
  1289. ZOPE_ERROR=$?
  1290. fi
  1291. if test -x $PHPFPM_SCRIPT; then
  1292. $PHPFPM_SCRIPT start
  1293. PHPFPM_ERROR=$?
  1294. fi
  1295. if test -x $HHVM_SCRIPT; then
  1296. $HHVM_SCRIPT start
  1297. HHVM_ERROR=$?
  1298. fi
  1299. if test -x $APACHE_SCRIPT; then
  1300. $APACHE_SCRIPT start
  1301. APACHE_ERROR=$?
  1302. fi
  1303. if test -x $VARNISH_SCRIPT; then
  1304. $VARNISH_SCRIPT start
  1305. VARNISH_ERROR=$?
  1306. fi
  1307. if test -x $NGINX_SCRIPT; then
  1308. $NGINX_SCRIPT start
  1309. NGINX_ERROR=$?
  1310. fi
  1311. if test -x $SUBVERSION_SCRIPT; then
  1312. $SUBVERSION_SCRIPT start
  1313. SUBVERSION_ERROR=$?
  1314. fi
  1315. if test -x $THIRD_SCRIPT; then
  1316. $THIRD_SCRIPT start
  1317. THIRD_ERROR=$?
  1318. fi
  1319. if test -x $NAGIOS_SCRIPT; then
  1320. $NAGIOS_SCRIPT start
  1321. NAGIOS_ERROR=$?
  1322. fi
  1323. if test -x $JETTY_SCRIPT; then
  1324. $JETTY_SCRIPT start
  1325. JETTY_ERROR=$?
  1326. fi
  1327. if test -x $HYPERSONIC_SCRIPT; then
  1328. $HYPERSONIC_SCRIPT start
  1329. HYPERSONIC_ERROR=$?
  1330. fi
  1331. else
  1332. help
  1333. fi
  1334.  
  1335. elif [ "x$1" = "xstatus" ]; then
  1336.  
  1337. if [ "x$2" = "xmariadb" ]; then
  1338. if test -x $MARIADB_SCRIPT; then
  1339. $MARIADB_SCRIPT status
  1340. sleep 2
  1341. fi
  1342. elif [ "x$2" = "xmysql" ]; then
  1343. if test -x $MYSQL_SCRIPT; then
  1344. $MYSQL_SCRIPT status
  1345. sleep 2
  1346. fi
  1347. elif [ "x$2" = "xlibreoffice" ]; then
  1348. if test -x $LIBREOFFICE_SCRIPT; then
  1349. $LIBREOFFICE_SCRIPT status
  1350. fi
  1351. elif [ "x$2" = "xmongodb" ]; then
  1352. if test -x $MONGODB_SCRIPT; then
  1353. $MONGODB_SCRIPT status
  1354. fi
  1355. elif [ "x$2" = "xcassandra" ]; then
  1356. if test -x $CASSANDRA_SCRIPT; then
  1357. $CASSANDRA_SCRIPT status
  1358. fi
  1359. elif [ "x$2" = "xcouchdb" ]; then
  1360. if test -x $COUCHDB_SCRIPT; then
  1361. $COUCHDB_SCRIPT status
  1362. fi
  1363. elif [ "x$2" = "xingres" ]; then
  1364. if test -x $INGRES_SCRIPT; then
  1365. $INGRES_SCRIPT status
  1366. fi
  1367. elif [ "x$2" = "xpostgresql" ]; then
  1368. if test -x $POSTGRESQL_SCRIPT; then
  1369. $POSTGRESQL_SCRIPT status
  1370. sleep 2
  1371. fi
  1372. elif [ "x$2" = "xhypersonic" ]; then
  1373. if test -x $HYPERSONIC_SCRIPT; then
  1374. $HYPERSONIC_SCRIPT status
  1375. fi
  1376. elif [ "x$2" = "xmemcached" ]; then
  1377. if test -x $MEMCACHED_SCRIPT; then
  1378. $MEMCACHED_SCRIPT status
  1379. fi
  1380. elif [ "x$2" = "xsolr" ]; then
  1381. if test -x $SOLR_SCRIPT; then
  1382. $SOLR_SCRIPT status
  1383. fi
  1384. elif [ "x$2" = "xelasticsearch" ]; then
  1385. if test -x $ELASTICSEARCH_SCRIPT; then
  1386. $ELASTICSEARCH_SCRIPT status
  1387. fi
  1388. elif [ "x$2" = "xlogstash" ]; then
  1389. if test -x $LOGSTASH_SCRIPT; then
  1390. $LOGSTASH_SCRIPT status
  1391. fi
  1392. elif [ "x$2" = "xlogstash-forwarder" ]; then
  1393. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  1394. $LOGSTASHFORWARDER_SCRIPT status
  1395. fi
  1396. elif [ "x$2" = "xkibana" ]; then
  1397. if test -x $KIBANA_SCRIPT; then
  1398. $KIBANA_SCRIPT status
  1399. fi
  1400. elif [ "x$2" = "xtomcat" ]; then
  1401. if test -x $TOMCAT_SCRIPT; then
  1402. $TOMCAT_SCRIPT status
  1403. fi
  1404. elif [ "x$2" = "xresin" ]; then
  1405. if test -x $RESIN_SCRIPT; then
  1406. $RESIN_SCRIPT status
  1407. fi
  1408. elif [ "x$2" = "xredis" ]; then
  1409. if test -x $REDIS_SCRIPT; then
  1410. $REDIS_SCRIPT status
  1411. fi
  1412. #RUBY_APPLICATION_STATUS
  1413. elif [ "x$2" = "xrabbitmq" ]; then
  1414. if test -x $RABBITMQ_SCRIPT; then
  1415. $RABBITMQ_SCRIPT status
  1416. fi
  1417. elif [ "x$2" = "xactivemq" ]; then
  1418. if test -x $ACTIVEMQ_SCRIPT; then
  1419. $ACTIVEMQ_SCRIPT status
  1420. fi
  1421. elif [ "x$2" = "xzope_application" ]; then
  1422. if test -x $ZOPE_SCRIPT; then
  1423. $ZOPE_SCRIPT status
  1424. fi
  1425. elif [ "x$2" = "xlucene" ]; then
  1426. if test -x $LUCENE_SCRIPT; then
  1427. $LUCENE_SCRIPT status
  1428. fi
  1429. elif [ "x$2" = "xapache" ]; then
  1430. if test -x $APACHE_SCRIPT; then
  1431. $APACHE_SCRIPT status
  1432. fi
  1433. elif [ "x$2" = "xphp-fpm" ]; then
  1434. if test -x $PHPFPM_SCRIPT; then
  1435. $PHPFPM_SCRIPT status
  1436. fi
  1437. elif [ "x$2" = "xhhvm" ]; then
  1438. if test -x $HHVM_SCRIPT; then
  1439. $HHVM_SCRIPT status
  1440. fi
  1441. elif [ "x$2" = "xvarnish" ]; then
  1442. if test -x $VARNISH_SCRIPT; then
  1443. $VARNISH_SCRIPT status
  1444. fi
  1445. elif [ "x$2" = "xnginx" ]; then
  1446. if test -x $NGINX_SCRIPT; then
  1447. $NGINX_SCRIPT status
  1448. fi
  1449. elif [ "x$2" = "xsubversion" ]; then
  1450. if test -x $SUBVERSION_SCRIPT; then
  1451. $SUBVERSION_SCRIPT status
  1452. fi
  1453. elif [ "x$2" = "xthird_application" ]; then
  1454. if test -x $THIRD_SCRIPT; then
  1455. $THIRD_SCRIPT status
  1456. fi
  1457. elif [ "x$2" = "xnagios" ]; then
  1458. if test -x $NAGIOS_SCRIPT; then
  1459. $NAGIOS_SCRIPT status
  1460. fi
  1461. elif [ "x$2" = "xjetty" ]; then
  1462. if test -x $JETTY_SCRIPT; then
  1463. $JETTY_SCRIPT status
  1464. fi
  1465. elif [ "x$2" = "xjboss" ]; then
  1466. if test -x $JBOSS_SCRIPT; then
  1467. $JBOSS_SCRIPT status
  1468. fi
  1469. elif [ "x$2" = "xwildfly" ]; then
  1470. if test -x $WILDFLY_SCRIPT; then
  1471. $WILDFLY_SCRIPT status
  1472. fi
  1473. elif [ "x$2" = "x" ]; then
  1474. if test -x $HYPERSONIC_SCRIPT; then
  1475. $HYPERSONIC_SCRIPT status
  1476. fi
  1477. if test -x $JETTY_SCRIPT; then
  1478. $JETTY_SCRIPT status
  1479. fi
  1480. if test -x $JBOSS_SCRIPT; then
  1481. $JBOSS_SCRIPT status
  1482. fi
  1483. if test -x $WILDFLY_SCRIPT; then
  1484. $WILDFLY_SCRIPT status
  1485. fi
  1486. if test -x $NAGIOS_SCRIPT; then
  1487. $NAGIOS_SCRIPT status
  1488. fi
  1489. if test -x $THIRD_SCRIPT; then
  1490. $THIRD_SCRIPT status
  1491. fi
  1492. if test -x $SUBVERSION_SCRIPT; then
  1493. $SUBVERSION_SCRIPT status
  1494. fi
  1495. if test -x $NGINX_SCRIPT; then
  1496. $NGINX_SCRIPT status
  1497. fi
  1498. if test -x $VARNISH_SCRIPT; then
  1499. $VARNISH_SCRIPT status
  1500. sleep 3
  1501. fi
  1502. if test -x $PHPFPM_SCRIPT; then
  1503. $PHPFPM_SCRIPT status
  1504. fi
  1505. if test -x $HHVM_SCRIPT; then
  1506. $HHVM_SCRIPT status
  1507. fi
  1508. if test -x $APACHE_SCRIPT; then
  1509. $APACHE_SCRIPT status
  1510. fi
  1511. #RUBY_APPLICATION_GENERIC_STATUS
  1512. if test -x $RABBITMQ_SCRIPT; then
  1513. $RABBITMQ_SCRIPT status
  1514. fi
  1515. if test -x $ACTIVEMQ_SCRIPT; then
  1516. $ACTIVEMQ_SCRIPT status
  1517. fi
  1518. if test -x $ZOPE_SCRIPT; then
  1519. $ZOPE_SCRIPT status
  1520. fi
  1521. if test -x $LUCENE_SCRIPT; then
  1522. $LUCENE_SCRIPT status
  1523. fi
  1524. if test -x $INGRES_SCRIPT; then
  1525. $INGRES_SCRIPT status
  1526. fi
  1527. if test -x $SOLR_SCRIPT; then
  1528. $SOLR_SCRIPT status
  1529. sleep 3
  1530. fi
  1531. if test -x $ELASTICSEARCH_SCRIPT; then
  1532. $ELASTICSEARCH_SCRIPT status
  1533. fi
  1534. if test -x $LOGSTASH_SCRIPT; then
  1535. $LOGSTASH_SCRIPT status
  1536. fi
  1537. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  1538. $LOGSTASHFORWARDER_SCRIPT status
  1539. fi
  1540. if test -x $KIBANA_SCRIPT; then
  1541. $KIBANA_SCRIPT status
  1542. fi
  1543. if test -x $TOMCAT_SCRIPT; then
  1544. $TOMCAT_SCRIPT status
  1545. sleep 3
  1546. fi
  1547. if test -x $RESIN_SCRIPT; then
  1548. $RESIN_SCRIPT status
  1549. sleep 3
  1550. fi
  1551. if test -x $REDIS_SCRIPT; then
  1552. $REDIS_SCRIPT status
  1553. sleep 3
  1554. fi
  1555.  
  1556. if test -x $LIBREOFFICE_SCRIPT; then
  1557. $LIBREOFFICE_SCRIPT status
  1558. fi
  1559. if test -x $MARIADB_SCRIPT; then
  1560. $MARIADB_SCRIPT status
  1561. fi
  1562. if test -x $MYSQL_SCRIPT; then
  1563. $MYSQL_SCRIPT status
  1564. fi
  1565. if test -x $POSTGRESQL_SCRIPT; then
  1566. $POSTGRESQL_SCRIPT status
  1567. sleep 3
  1568. fi
  1569. if test -x $MONGODB_SCRIPT; then
  1570. $MONGODB_SCRIPT status
  1571. fi
  1572. if test -x $CASSANDRA_SCRIPT; then
  1573. $CASSANDRA_SCRIPT status
  1574. fi
  1575. if test -x $COUCHDB_SCRIPT; then
  1576. $COUCHDB_SCRIPT status
  1577. fi
  1578. if test -x $MEMCACHED_SCRIPT; then
  1579. $MEMCACHED_SCRIPT status
  1580. fi
  1581. else
  1582. help
  1583. fi
  1584. elif [ "x$1" = "xcleanpid" ]; then
  1585. if test -x $HYPERSONIC_SCRIPT; then
  1586. $HYPERSONIC_SCRIPT cleanpid
  1587. fi
  1588. if test -x $JBOSS_SCRIPT; then
  1589. $JBOSS_SCRIPT cleanpid
  1590. fi
  1591. if test -x $WILDFLY_SCRIPT; then
  1592. $WILDFLY_SCRIPT cleanpid
  1593. fi
  1594. if test -x $NAGIOS_SCRIPT; then
  1595. $NAGIOS_SCRIPT cleanpid
  1596. fi
  1597. if test -x $SUBVERSION_SCRIPT; then
  1598. $SUBVERSION_SCRIPT cleanpid
  1599. fi
  1600. if test -x $PHPFPM_SCRIPT; then
  1601. $PHPFPM_SCRIPT cleanpid
  1602. fi
  1603. if test -x $HHVM_SCRIPT; then
  1604. $HHVM_SCRIPT cleanpid
  1605. fi
  1606. if test -x $APACHE_SCRIPT; then
  1607. $APACHE_SCRIPT cleanpid
  1608. fi
  1609. if test -x $NGINX_SCRIPT; then
  1610. $NGINX_SCRIPT cleanpid
  1611. fi
  1612. if test -x $LUCENE_SCRIPT; then
  1613. $LUCENE_SCRIPT cleanpid
  1614. fi
  1615. if test -x $SOLR_SCRIPT; then
  1616. $SOLR_SCRIPT cleanpid
  1617. fi
  1618. if test -x $ELASTICSEARCH_SCRIPT; then
  1619. $ELASTICSEARCH_SCRIPT cleanpid
  1620. fi
  1621. if test -x $LOGSTASH_SCRIPT; then
  1622. $LOGSTASH_SCRIPT cleanpid
  1623. fi
  1624. if test -x $LOGSTASHFORWARDER_SCRIPT; then
  1625. $LOGSTASHFORWARDER_SCRIPT cleanpid
  1626. fi
  1627. if test -x $KIBANA_SCRIPT; then
  1628. $KIBANA_SCRIPT cleanpid
  1629. fi
  1630. if test -x $TOMCAT_SCRIPT; then
  1631. $TOMCAT_SCRIPT cleanpid
  1632. fi
  1633. if test -x $MARIADB_SCRIPT; then
  1634. $MARIADB_SCRIPT cleanpid
  1635. fi
  1636. if test -x $MYSQL_SCRIPT; then
  1637. $MYSQL_SCRIPT cleanpid
  1638. fi
  1639. if test -x $POSTGRESQL_SCRIPT; then
  1640. $POSTGRESQL_SCRIPT cleanpid
  1641. fi
  1642. if test -x $MONGODB_SCRIPT; then
  1643. $MONGODB_SCRIPT cleanpid
  1644. fi
  1645. if test -x $CASSANDRA_SCRIPT; then
  1646. $CASSANDRA_SCRIPT cleanpid
  1647. fi
  1648. if test -x $COUCHDB_SCRIPT; then
  1649. $COUCHDB_SCRIPT cleanpid
  1650. fi
  1651. if test -x $MEMCACHED_SCRIPT; then
  1652. $MEMCACHED_SCRIPT cleanpid
  1653. fi
  1654. if test -x $VARNISH_SCRIPT; then
  1655. $VARNISH_SCRIPT cleanpid
  1656. fi
  1657. if test -x $REDIS_SCRIPT; then
  1658. $REDIS_SCRIPT cleanpid
  1659. fi
  1660. else
  1661. help
  1662. exit 1
  1663. fi
  1664.  
  1665.  
  1666. # Enable Monit
  1667. if [ -f "$INSTALLDIR/config/monit/bitnami.conf" ] && [ `id -u` = 0 ] && [ `which monit 2> /dev/null` ] && ( [ "x$1" = "xstart" ] || [ "x$1" = "xrestart" ] ); then
  1668. if [ "x$2" = "x" ]; then
  1669. env -i monit monitor all
  1670. elif [ -f "$INSTALLDIR/config/monit/conf.d/$2.conf" ]; then
  1671. env -i monit monitor $2
  1672. fi
  1673. fi
  1674.  
  1675.  
  1676. # Checking for errors
  1677. for e in $VARNISH_ERROR $PHPFPM_ERROR $HHVM_ERROR $APACHE_ERROR $NGINX_ERROR $MARIADB_ERROR $MYSQL_ERROR $MONGODB_ERROR $CASSANDRA_ERROR $COUCHDB_ERROR $SUBVERSION_ERROR $SOLR_ERROR $ELASTICSEARCH_ERROR $LOGSTASH_ERROR $LOGSTASHFORWARDER_ERROR $KIBANA_ERROR $TOMCAT_ERROR $REDIS_ERROR $RESIN_ERROR $MEMCACHED_ERROR $INGRES_ERROR $LIBREOFFICE_ERROR $LUCENE_ERROR $ZOPE_ERROR $POSTGRESQL_ERROR $THIRD_ERROR $NAGIOS_ERROR $RABBITMQ_ERROR $ACTIVEMQ_ERROR $JETTY_ERROR $JBOSS_ERROR $WILDFLY_ERROR $HYPERSONIC_ERROR; do
  1678. if [ $e -gt 0 ]; then
  1679. ERROR=$e
  1680. fi
  1681. done
  1682. #RUBY_APPLICATION_ERROR
  1683. # Restoring SELinux
  1684. if [ -f "/usr/sbin/getenforce" ] && [ `id -u` = 0 ] ; then
  1685. /usr/sbin/setenforce $selinux_status 2> /dev/null
  1686. fi
  1687.  
  1688. exit $ERROR
RAW Paste Data