Create Useful commands authored by Nikolai.Hartmann's avatar Nikolai.Hartmann
# xcache service unit
Show status
```bash
systemctl status systemd-nspawn@xcache
```
Restart
```bash
systemctl restart systemd-nspawn@xcache
```
Show logs
```bash
journalctl -eu systemd-nspawn@xcache [--since ...]
```
# container commands
run a command in a new container using the xcache image (as xrootd user)
```bash
systemd-nspawn -D /var/lib/machines/xcache <command>
```
get a shell (as xrootd user)
```bash
systemd-nspawn -D /var/lib/machines/xcache /bin/bash
```
get a shell in a running container (as root, usually not nescessary)
```
nsenter --target=$(machinectl show --property Leader xcache | sed "s/^Leader=//") --all
```
\ No newline at end of file