INNER CODE UNIT · Ruby

self

stevius10/Proxmox-GitOps · config/libraries/common.rb:39

  def self.application(ctx, name, user: Default.user, group: Default.group,
      exec: nil, cwd: nil, unit: {}, actions: [:enable, :start], subscribe: nil, reload: 'systemd_reload',
      restart: 'on-failure', restart_delay: 10, restart_limit: 10, restart_max: 600,
      verify: true, verify_timeout: 60, verify_interval: 5, verify_cmd: "systemctl is-active --quiet #{name}")

    if exec
      daemon(ctx, reload)

      defaults = {
        'Unit' => {
          'Description' => name.capitalize, 'After' => 'network.target',
          'StartLimitBurst' => restart_limit,
          'StartLimitIntervalSec' => restart_max
        },
        'Service' => ( {
          'Type' => 'simple', 'User' => user, 'Group' => group,
          'Restart' => restart,
          'RestartSec' => restart_delay

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…