protected function configure() { parent::configure(); $this->setName('vhost:enable')->addOption('force', null, InputOption::VALUE_NONE, 'Skip checks before overwriting symlink')->setDescription('Enables one or more vhosts')->setHelp(<<<'EOF' The <info>%command.name%</info> command re-enables access to a vhost after it was disabled: <info>%command.full_name% auth.vbgn.be</info> This command changes the symbolic link of the vhost to its correct location, so it can be accessed again by the webserver. To prevent accidental removal of an externally changed symlink, its status and target directory are first verified to match its expected values. To override these checks, use the <comment>--force</comment> option. <info>%command.full_name% -A --force</info> To disable a vhost, use the <info>vhost:disable</info> command. To remove a vhost, use the <info>vhost:remove</info> command. EOF ); }
protected function configure() { parent::configure(); $this->setName('vhost:remove')->setAliases(['vhost:rm'])->addOption('force', null, InputOption::VALUE_NONE, 'Force remove vhost, even if link target does not match expected target.')->setDescription('Remove web-accessible entrypoint to an application')->setHelp(<<<'EOF' The <info>%command.name%</info> command removes a web-accessible entrypoint to an application: <info>%command.full_name% auth.vbgn.be</info> This command removes a symbolic link in the directory set by <comment>vhosts-dir</comment>. This command does not modify webserver configuration to direct a domain to the symbolic link, this should be done separately. To prevent accidental removal of an externally changed symlink, its status and target directory are first verified to match its expected values. To override these checks, use the <comment>--force</comment> option. <info>%command.full_name% -A --force</info> To add a vhost, use the <info>vhost:add</info> command. To disable a vhost, use the <info>vhost:disable</info> command. To enable a vhost, use the <info>vhost:enable</info> command. EOF ); }