---
name: "zopectl"
section: "8"
platform: "linux"
package: "zopectl"
version: "0.3.4.3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/zopectl"
---

# zopectl(8)

Zope instances controlling tool

## NAME

**zopectl - Zope instances controlling tool**

## SYNOPSIS

```
zopectl options [ action [ [ instance_name ] ... ] ]
zopectl [ options ] action [ [ instance_name ] ... ]
```

## DESCRIPTION

**zopectl is an utility capable of managing multiple zope instances. It can** **apply a sequence of actions to multiple instances. All the instances are** **described files either in /etc/zopectl/\*.conf or in /etc/zopectl/\*.ini (see** **[zopectlrc(5)](/zopectlrc/5.md)).**

## OPTIONS

**Each option need an argument. Each argument must be a comma separated list** **of** *instance\_name***. The special '\*'** *instance\_name* **will trigger the option for** **all known instances.**

**For each** *instance\_name* **resulting from option parsing:**

- **-s, --start**

  **Apply** *action* **'start'**

- **-S, --stop**

  **Apply** *action* **'stop'**

- **-r, --restart**

  **Apply** *action* **'restart'**

- **-f, --force-reload**

  **Apply** *action* **'force-reload'**

- **-a, --access**

  **Apply** *action* **'access'**

- **-p, --pcgi**

  **Apply** *action* **'pcgi'**

- **-i, --init**

  **Apply** *action* **'init'**

- **-d, --delete**

  **Apply** *action* **'delete'**

- **-l, --logrotate**

  **Apply** *action* **'logrotate'**

- **-D, --dump**

  **Apply** *action* **'dump'**

**If** *action* **is provided as argument, zopectl will apply** *action* **to any** *instance\_name* **specified as argument. If no** *instance\_name* **is specified,** **zopectl will apply** *action* **to all known** *instance\_name***.**

**Unknown** *instance\_name* **are ignored.**

## ACTIONS

*action* **may be one of the following:**

- **start**

  **Starts the instance using /usr/lib/zope/z2.py**

- **stop**

  **Sends SIGTERM to instance**

- **restart**

  **If instance is running, sends SIGHUP to instance; else** **falls back to start** *action*

- **force-reload**

  **Stops the instance, reload the configuration end then start it** **anew**

- **logrotate**

  **Sends SIGUSR2 to instance which make instance to reopen log** **files (see Zope's SIGNALS.txt)**

- **access**

  **Regenerate/create the emergency user file**

- **pcgi**

  **Regenerate/create the PCGI resource file**

- **delete**

  **Stops instance and remove all files and directory used by** **instance (logs are not removed)**

- **init**

  **Initialize** *instance\_name* **files and directories setting up** **permissions and ownership, but does not create access file or** **PCGI resource file.**

- **dump**

  **Dump a tagged list 'name: value' of the instance** **configuration.**

## EXAMPLES

**Just a test:**

```
      # zopectl --start --restart --force-reload stop
```

**This command will apply each** *action* **in sequence, so, at the end, it won't do** **anything of real use.**

```
      # zopectl --init new_instance --pcgy new_instance --access new_instance
```

**This command will completly set up the instance named 'new\_instance'. create** *action* **is deprecated, so you should now use these three.**

**Your Zope logrotate.conf may include the following lines:**

```
      postrotate
        zopectl logrotate
      endscript
```

## NOTE

**create** *action* **is DEPRECATED. Use init instead.**

## FILES

- **/etc/zopectl/zopectlrc**

  **The zopectl runtime configuration file**

- **/etc/zopectl/\*.{conf,ini}**

  **The instances configuration files**

## SEE ALSO

**[zope-z2(8)](/zope-z2/8.md), [zope-zpasswd(8)](/zope-zpasswd/8.md), [zopectlrc(5)](/zopectlrc/5.md)**

## AUTHOR

**Luca - De Whiskey's - De Vitis \<luca@debian.org\>**
