{"id":1019569,"date":"2016-01-18T15:31:31","date_gmt":"2016-01-18T13:31:31","guid":{"rendered":"http:\/\/www.sv5fri.eu\/?p=1019569"},"modified":"2018-10-23T13:12:37","modified_gmt":"2018-10-23T11:12:37","slug":"dxspider-init-script-for-centos","status":"publish","type":"post","link":"https:\/\/www.sv5fri.eu\/?p=1019569","title":{"rendered":"Run DxSpider as service on the CentOS \/ RedHat \/ Fedora"},"content":{"rendered":"<p>How to run dxspider as service.<\/p>\n<p>Create init script with name dxpider as root user in the below path \/etc\/init.d\/<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">cd \/etc\/init.d\/\r\n\r\ntouch dxspider\r\n\r\nvi dxspider<\/pre>\n<p>Create script with name <strong>dxspider<\/strong> and like as below<\/p>\n<p><!--more--><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/bin\/sh\r\n#\r\n# chkconfig: 235 60 30\r\n# description: Hamradio - DXSpider Cluster\r\n# Created: 24 May 2012 by Yiannis Panagou, SV5FRI\r\n# Vesrion: 1.1 - Last Modified: 29\/07\/2016\r\n# Email: sv5fri@gmail.com\r\n#\r\n#\r\n# Source function library.\r\n. \/etc\/rc.d\/init.d\/functions\r\n\r\n# Source networking configuration.\r\n. \/etc\/sysconfig\/network\r\n\r\npidfile=\/spider\/local\/cluster.lck\r\n\r\n# Check that networking is up.\r\n[ ${NETWORKING} = \"no\" ] &amp;&amp; exit 0\r\n\r\nlockfile=\/var\/lock\/subsys\/dxspider\r\n\r\nRETVAL=0\r\n\r\n  start()\r\n   {\r\n   echo  \"Starting DXSpider Server\"\r\n   \/bin\/su - sysop -c \"\/usr\/bin\/perl -w \/spider\/perl\/cluster.pl\" &gt;\/dev\/tty7&amp;\r\n        RETVAL=$?\r\n        [ $RETVAL -eq 0 ] &amp;&amp; touch \/var\/lock\/subsys\/dxspider\r\n        echo\r\n        return $RETVAL\r\n   }\r\n\r\n  stop()\r\n   {\r\n   echo  \"Stopping DXSpider Server\"\r\n        killproc \/usr\/bin\/perl\r\n        RETVAL=$?\r\n        [ $RETVAL -eq 0 ] &amp;&amp; rm -f \/var\/lock\/subsys\/dxspider\r\n        echo\r\n        return $RETVAL\r\n        }\r\n\r\n  restart()\r\n   {\r\n       stop\r\n     sleep 5\r\n       start\r\n   }\r\n\r\ncase \"$1\" in\r\n  start)\r\n     start\r\n  ;;\r\n\r\n  stop)\r\n    stop\r\n  ;;\r\n\r\n  restart)\r\n    restart\r\n  ;;\r\n  status)\r\n        status -p $pidfile DXSpider\r\n        RETVAL=$?\r\n  ;;\r\n\r\n  *)\r\n  echo $\"Usage: $0 {start|stop|restart|status}\"\r\n        exit $?\r\n        ;;\r\nesac\r\nexit $?<\/pre>\n<pre class=\"lang:default decode:true \" title=\"DxSpider init file for CentOS\"><span style=\"font-family: georgia, palatino, serif;\">Change the permissions<\/span>\r\n\r\n<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">chmod +x dxspider<\/pre>\n<p>Remove or disable line from \/etc\/inittab<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">DX:2345:respawn:\/bin\/su -c \"\/usr\/bin\/perl -w \/spider\/perl\/cluster.pl\" sysop &gt;\/dev\/tty6<\/pre>\n<p>For start dx cluster<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">\/etc\/init.d\/dxspider start<\/pre>\n<p>For stop dxspider<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">\/etc\/init.d\/dxspider stop<\/pre>\n<p>For check if running dx cluster<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">\/etc\/init.d\/dxspider status<\/pre>\n<p>If you need help please contact with me<\/p>\n<p>Good luck \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to run dxspider as service. Create init script with name dxpider as root user in the below path \/etc\/init.d\/ cd \/etc\/init.d\/ touch dxspider vi dxspider&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[3],"tags":[53,44,40,55,28,52,54,56],"class_list":["post-1019569","post","type-post","status-publish","format-standard","hentry","category-projects","tag-centos","tag-dxcluster","tag-dxspider","tag-fedora","tag-ham-radio","tag-init-files","tag-redhat","tag-run-dxspider-as-service"],"_links":{"self":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts\/1019569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1019569"}],"version-history":[{"count":4,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts\/1019569\/revisions"}],"predecessor-version":[{"id":4318071,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=\/wp\/v2\/posts\/1019569\/revisions\/4318071"}],"wp:attachment":[{"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1019569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1019569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sv5fri.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1019569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}