diff --git a/systemd/README.md b/systemd/README.md index 7a34121b6..bf810a00b 100644 --- a/systemd/README.md +++ b/systemd/README.md @@ -11,56 +11,70 @@ These files help run all the various parts of CAPE as systemd services, so that 1. Install virtualenv + ```bash sudo apt-get install -y python-virtualenv - + ``` 2. Place CAPE in `/opt/CAPE` 3. Ensure the `CAPE` directory is owned by the `cuckoo` user + ```bash sudo chown cuckoo:cuckoo -R /opt/CAPE - + ``` 4. Switch to the cuckoo user + ```bash sudo su cuckoo + ``` 5. Create a virtualenv at `/opt/CAPE/venv` + ```bash virtualenv /opt/CAPE/venv + ``` 6. Install required Python packages inside the virtualenv + ```bash /opt/CAPE/venv/bin/pip install -U -r /opt/CAPE/requirements.txt + ``` 7. Edit configuration files in `/opt/CAPE/conf` as needed 8. Return to your user + ```bash exit + ``` 9. Install the `systemd` service unit configuration files + ```bash sudo cp /opt/CAPE/systemd/*.service /opt/systemd/system sudo sudo systemctl daemon-reload + ``` 10. Start the services for the first time + ```bash sudo service cuckoo-rooter start sudo service cuckoo-processor start sudo service cuckoo start sudo service cuckoo-wsgi start + ``` ## Troubleshooting To view the status and console output of a service: - bash - service cuckoo status - +```bash +service cuckoo status +``` To view the full output of a service (including crashed services): - - journalctl -u cuckoo-wsgi.service -r - +```bash +journalctl -u cuckoo-wsgi.service -r +``` Note: The `journalctl -r` switch displays the log lines in reverse order, with the newest lines on top. \ No newline at end of file