[Eisfair] SysV-Initskript in SystemD-Unit umwandeln
Marcus Röckrath
marcus.roeckrath at gmx.de
Di Okt 28 09:52:19 CET 2025
Hallo Kay,
Marcus Röckrath wrote:
>> Du packst deine Wunschbefehle in ein Skript und erstellst eine SystemD-
>> Service-Datei, die dann das Skript beim Booten ausführt.
>
> Da eine SystemD-Unit auch mehrere ExecStart-Befehle enthalten kann, kannst
> du auch auf ein Skript verzichten und dann in der Service-Datei
>
> ExecStart=hdparm ... platte1
> ExecStart=hdparm ... platte2
>
> usw. schreiben.
Das darf sie aber nur beim Type=oneshot:
ExecStart=
Commands that are executed when this service is started.
Unless Type= is oneshot, exactly one command must be given. When
Type=oneshot is used, this setting may be used multiple times to define
multiple commands to execute. If the empty string is assigned to this
option, the list of commands to start is reset, prior assignments of this
option will have no effect. If no ExecStart= is specified, then the service
must have RemainAfterExit=yes and at least one ExecStop= line set. (Services
lacking both ExecStart= and ExecStop= are not valid.)
https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html
--
Gruß Marcus
[eisfair-Team]
Mehr Informationen über die Mailingliste Eisfair