Use case: You use a RaspberryPi in the car, and want to start the charging software just by powering-up the Raspberry.
(Based on https://gist.github.com/emxsys/a507f3cad928e66f6410e7ac28e2990f)
We want to run the pevNoGui.py as superuser automatically after startup. To achieve this, we create a service, which we give the name "pev".
```
cd /lib/systemd/system/
sudo nano pev.service
```
In this file, we write the following, to configure the new service:
```
[Unit]
Description=The PEV.
After=multi-user.target
[Service]
Type=simple
ExecStart=/home/pi/myprogs/myPlc/starter.sh
Restart=on-abort
[Install]
WantedBy=multi-user.target
```
Finally we configure the attributes of the service, change the starter shell file to be executable, reload the service configuration and enable and start
More possibilities are shown in https://wiki.archlinux.org/title/Systemd/Journal.
The service log will grow very large, because it contains the complete communication during the charging session. To avoid filling the disk space with old logs, we may want to limit the size. One option is explained at https://got-tty.org/journalctl-via-journald-conf-die-loggroesse-definierenDo:
`nano /etc/systemd/journald.conf` and set the settings
```
SystemMaxUse=500M
SystemMaxFileSize=100M
```
The first value defines the overall disk space which is used by the service logs. The second value specifies the maximum size of a single log file.
With standard settings, the Raspberry tries to find an internet connection on the ethernet port, this means it tries to do things like DHCP and RouterSolicitation. This procedure may disturb the communication between the PEV and EVSE. That's why it is recommended to forbid the Network Manager to care for the eth0.
Solution ideas: https://stackoverflow.com/questions/5321380/disable-network-manager-for-a-particular-interface or https://access.redhat.com/documentation/de-de/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-networkmanager-to-ignore-certain-devices_configuring-and-managing-networking Todo: which is the correct way on the raspberry?