Editing Systemd Units¶
Muppy provides complete editing features for Systemd Service Units.
Muppy uses these features to manage most of the services it installs (Traefik, Code Server, pglookout, Odoo, ...).
Muppy supports 2 workflows on Unit files:
- Workflow for creating a Unit file from a Muppy Template file
- Workflow for modifying an existing Unit file
Creation Workflow¶
This is the workflow Muppy uses to manage the services it installs. It is made up of the following steps:
- Create a Systemd Units by providing the Host and Unit Name.
- In the Configuration tab:
- In the Unit File tab,
- Use the 4
buttons to control the Systemd Unit.
Modification Workflow¶
The objective - in the long run - of this workflow is to allow an existing Unit File to be managed through the Muppy interface by following these steps:
- Import a System Unit with the Wizard as described in Import Systemd Units Wizard
- Open the Service Unit in edit mode
- In the Unit File tab,
- Click the
button; Muppy will download the Unit File from the location defined by Unit File Path and display its content in Unit File Content. - Modify the content of the Unit File Content field
- Click the
button so that Muppy uploads the content of the Unit File to the location defined by Unit File Path. - Click the
button so that the system takes the changes into account
- Click the
Info
You can also generate the content of the Unit File using the variables of the configuration group and a specific Template file, as described in the previous paragraph.
Removing a Systemd Unit¶
Three buttons remove a unit. They differ in what they do on the Host.
| Button | Where | What it does |
|---|---|---|
| Forget Unit | the header of the unit's form, and each line of the units list | Deletes the unit's record in Muppy, with the records of its aliases. The unit, its unit file and its state stay on the Host. A scan of the Host can import the unit again. From the form, you land on the Host. |
| Remove | each line of the units list | Stops and disables the unit on the Host, deletes its unit file, then deletes its record in Muppy. |
| Delete Unit File | the Unit File tab of the form, once the unit is disabled | Deletes the unit file on the Host. The record stays in Muppy. |
Danger
Remove and Delete Unit File delete the file that Unit File Path names, wherever it lives. For a unit installed by a package (redis-server, cron, … under /usr/lib/systemd/system), that file belongs to the package: deleting it breaks the package. To stop monitoring such a unit, use Forget Unit.
Delete Unit File refuses a Unit File Path that is not absolute, or that ends with /: it deletes one file, never a directory.



