{"id":236,"date":"2009-02-02T17:50:44","date_gmt":"2009-02-02T15:50:44","guid":{"rendered":"http:\/\/blog.sqawasmi.com\/?p=236"},"modified":"2009-02-02T17:50:44","modified_gmt":"2009-02-02T15:50:44","slug":"inittab-to-auto-restart-script","status":"publish","type":"post","link":"https:\/\/blog.sqawasmi.com\/index.php\/2009\/02\/02\/inittab-to-auto-restart-script\/","title":{"rendered":"inittab to auto restart script"},"content":{"rendered":"<p>Do you have a script\/application that you want it running all the time, if it crashed then it auto restrart, auto launch on reboot ?, I have a php script that must run all the time, it do telnet to a port on another server and do some commands on that port&#8230; anyway i want this to be running all the time, i did it easily using respawn in inttab, this is the steps:<\/p>\n<p>idlE ~ # vi \/etc\/inittab<\/p>\n<p>at the end of the file add the following:<\/p>\n<blockquote><p>ax:2345:respawn:\/root\/scripts\/sendSMS.sh<\/p><\/blockquote>\n<p>change \/root\/scripts\/sendSMS.sh to your script\/application path, then save and quit.<\/p>\n<p>now you need to reread inittab file using the following command:<\/p>\n<blockquote><p>idlE ~ # init q<\/p><\/blockquote>\n<p>thats all, check the running process.<\/p>\n<h3>Related Images:<\/h3>","protected":false},"excerpt":{"rendered":"<p>Do you have a script\/application that you want it running all the time, if it crashed then it auto restrart, auto launch on reboot ?, I have a php script that must run all the time, it do telnet to a port on another server and do some commands on that port&#8230; anyway i want [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"footnotes":""},"categories":[22,7],"tags":[],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-cli","category-scripting-cli"],"_links":{"self":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":1,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}