Ignore:
Timestamp:
Aug 11, 2009, 10:38:42 PM (15 years ago)
Author:
broder
Message:

In invirt-remote:

  • Instead of running all of the disk-wiping dds simultaneously, run them sequentially using a janitor daemon (LP: #411486).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/debian/invirt-remote-host.init

    r1822 r2436  
    2121}
    2222
    23 case "$1" in
    24   start|reload|force-reload|restart)
     23reload_cfg()
     24{
    2525    log_begin_msg "Reloading config for $PACKAGE"
    2626    gen_config
    2727    log_end_msg $?
    2828    invoke-rc.d openbsd-inetd start # returns 1 if inetd is running
    29     [ $? -eq 1 ] && exit 0
     29}
     30
     31case "$1" in
     32  start)
     33    reload_cfg
     34
     35    log_begin_msg "Starting the invirt-janitor for $PACKAGE"
     36    daemon -n invirt-janitor -r invirt-janitor
     37    log_end_msg $?
     38    ;;
     39  force-reload|restart)
     40    reload_cfg
     41
     42    log_begin_msg "Restarting the invirt-janitor for $PACKAGE"
     43    daemon -n invirt-janitor --restart
     44    log_end_msg $?
    3045    ;;
    3146  stop)
     47    log_begin_msg "Stopping the invirt-janitor for $PACKAGE"
     48    daemon -n invirt-janitor --stop
     49    log_end_msg $?
    3250    ;;
    3351  *)
    34     log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
     52    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|force-reload|restart|stop}"
    3553    ;;
    3654esac
Note: See TracChangeset for help on using the changeset viewer.