autoupdater.pl 407 B

1234567891011121314151617181920212223
  1. my $cfg = $CONFIG->{autoupdater};
  2. print <<'END';
  3. #/bin/sh
  4. uci -q batch <<EOF
  5. delete autoupdater.default
  6. set autoupdater.default=autoupdater
  7. END
  8. for (qw(enabled branch url probability good_signatures)) {
  9. print 'set autoupdater.default.' . $_ . '=' . $cfg->{$_} . "\n";
  10. }
  11. for (@{$cfg->{pubkeys}}) {
  12. print 'add_list autoupdater.default.pubkey=' . $_ . "\n";
  13. }
  14. print <<END;
  15. commit autoupdater
  16. EOF
  17. END