Alexander Farber
2011-Oct-04 21:44 UTC
[CentOS] Migrating CentOS 5 -> 6: where to put /etc/inittab respawn scripts?
Hello, sorry, for 1 more question on CentOS 5 -> CentOS 6 migration. On my old CentOS 5.7 machine I have the following line: pref:3:respawn:/bin/su -c '/usr/local/pref/pref.pl >/tmp/pref-`date +%a`.txt 2>&1' afarber and this has served me well, I don't want to install anything else like daemontools etc. - to keep my web-server easily reinstallable (or movable to another hoster). But now I have migrated to CentOS 6.0, added that line and the "init q", but nothing happens - as indeed promised by the comments in the new /etc/inittab. Where should I move my line, which docs to read? The pref.pl is a poll()ing TCP-sockets daemon for a game Thank you Alex
Brian Mathis
2011-Oct-04 21:51 UTC
[CentOS] Migrating CentOS 5 -> 6: where to put /etc/inittab respawn scripts?
On Tue, Oct 4, 2011 at 5:44 PM, Alexander Farber <alexander.farber at gmail.com> wrote:> Hello, > > sorry, for 1 more question on CentOS 5 -> CentOS 6 migration. > > On my old CentOS 5.7 machine I have the following line: > > pref:3:respawn:/bin/su -c '/usr/local/pref/pref.pl >/tmp/pref-`date > +%a`.txt 2>&1' afarber > > and this has served me well, I don't want to install > anything else like daemontools etc. - to keep my web-server > easily reinstallable (or movable to another hoster). > > But now I have migrated to CentOS 6.0, added that line > and the "init q", but nothing happens - as indeed promised > by the comments in the new /etc/inittab. > > Where should I move my line, which docs to read? > > The pref.pl is a poll()ing TCP-sockets daemon for a game > > Thank you > AlexThis sounds like something you should be using the 'service' framework for, instead of inittab. In CentOS 5 you would create a script in /etc/init.d and start the service from there. I'm not yet familiar with CentOS 6, but I would bet looking for docs on how to do that will lead you in the right direction. -? Brian Mathis ?-
Johnny Tan
2011-Oct-05 03:46 UTC
[CentOS] Migrating CentOS 5 -> 6: where to put /etc/inittab respawn scripts?
On Oct 4, 2011 5:45 PM, "Alexander Farber" <alexander.farber at gmail.com> wrote:> > Where should I move my line, which docs to read?Like recent Ubuntus, C6 uses upstart in place of traditional Sys V init. Likely, you will want this in /etc/init/ -- note!, not the same as /etc/init.d/ johnny