Add faxgetty services to daemontools as upstart doesn't support inittab

tags/0.1.1_el5
Daniel Berteaud 10 years ago
parent 037178b810
commit f6876a8e40
  1. 18
      createlinks
  2. 1
      root/etc/e-smith/db/configuration/defaults/faxgetty-iax/status
  3. 1
      root/etc/e-smith/db/configuration/defaults/faxgetty-iax/type
  4. 1
      root/etc/e-smith/db/configuration/defaults/faxgetty-iax2/status
  5. 1
      root/etc/e-smith/db/configuration/defaults/faxgetty-iax2/type
  6. 7
      root/var/service/faxgetty-iax/log/run
  7. 9
      root/var/service/faxgetty-iax/run
  8. 7
      root/var/service/faxgetty-iax2/log/run
  9. 9
      root/var/service/faxgetty-iax2/run

@ -5,20 +5,36 @@ use esmith::Build::CreateLinks qw(:all);
service_link_enhanced("iaxmodem", "S95", "7"); service_link_enhanced("iaxmodem", "S95", "7");
service_link_enhanced("iaxmodem", "K05", "6"); service_link_enhanced("iaxmodem", "K05", "6");
service_link_enhanced("iaxmodem", "K05", "0"); service_link_enhanced("iaxmodem", "K05", "0");
service_link_enhanced("iaxmodem2", "S95", "7");
service_link_enhanced("iaxmodem2", "K05", "6");
service_link_enhanced("iaxmodem2", "K05", "0");
service_link_enhanced("faxgetty-iax", "S96", "7");
service_link_enhanced("faxgetty-iax", "K03", "6");
service_link_enhanced("faxgetty-iax", "K03", "0");
service_link_enhanced("faxgetty-iax2", "S96", "7");
service_link_enhanced("faxgetty-iax2", "K03", "6");
service_link_enhanced("faxgetty-iax2", "K03", "0");
safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/hylafax"); safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/hylafax");
safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/iaxmodem"); safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/iaxmodem");
safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/iaxmodem2"); safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/iaxmodem2");
safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/faxgetty-iax");
safe_symlink("restart", "root/etc/e-smith/events/fax-update/services2adjust/faxgetty-iax2");
templates2events("/etc/iaxmodem/iaxmodem-cfg.ttyIAX", qw(fax-update bootstrap-console-save)); templates2events("/etc/iaxmodem/iaxmodem-cfg.ttyIAX", qw(fax-update bootstrap-console-save));
templates2events("/etc/iaxmodem/iaxmodem-cfg.ttyIAX2", qw(fax-update bootstrap-console-save)); templates2events("/etc/iaxmodem/iaxmodem-cfg.ttyIAX2", qw(fax-update bootstrap-console-save));
templates2events("/etc/inittab", qw(fax-update));
safe_touch("root/var/service/iaxmodem/down"); safe_touch("root/var/service/iaxmodem/down");
safe_touch("root/var/service/iaxmodem2/down"); safe_touch("root/var/service/iaxmodem2/down");
safe_touch("root/var/service/faxgetty-iax/down");
safe_touch("root/var/service/faxgetty-iax2/down");
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/iaxmodem'); safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/iaxmodem');
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/iaxmodem2'); safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/iaxmodem2');
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/faxgetty-iax');
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/faxgetty-iax2');
safe_symlink("/var/service/iaxmodem" , 'root/service/iaxmodem'); safe_symlink("/var/service/iaxmodem" , 'root/service/iaxmodem');
safe_symlink("/var/service/iaxmodem2" , 'root/service/iaxmodem2'); safe_symlink("/var/service/iaxmodem2" , 'root/service/iaxmodem2');
safe_symlink("/var/service/faxgetty-iax" , 'root/service/faxgetty-iax');
safe_symlink("/var/service/faxgetty-iax2" , 'root/service/faxgetty-iax2');

@ -0,0 +1,7 @@
#!/bin/sh
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/faxgetty-iax

@ -0,0 +1,9 @@
#!/bin/sh
STATUS=$(/sbin/e-smith/db configuration getprop iaxmodem status || echo disabled)
if [ "$STATUS" != "enabled" ]; then
sv d .
fi
exec /usr/sbin/faxgetty ttyIAX

@ -0,0 +1,7 @@
#!/bin/sh
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/faxgetty-iax2

@ -0,0 +1,9 @@
#!/bin/sh
STATUS=$(/sbin/e-smith/db configuration getprop iaxmodem2 status || echo disabled)
if [ "$STATUS" != "enabled" ]; then
sv d .
fi
exec /usr/sbin/faxgetty ttyIAX2
Loading…
Cancel
Save