Puede identificar la interfaz utilizada con este comando (ejecutar como root):
iwconfig 2>/dev/null | grep -o "^\w*"
y la salida será, por ejemplo,:
wlan0
Tienes que guardar la respuesta en una variable en tu script
Да! Используйте другой тип:)
Type=forking
systemd руководство страница говорит:
If set to forking, it is expected that the process configured with ExecStart= will call fork() as part of its start-up. The parent process is expected to exit when start-up is complete and all communication channels are set up. The child continues to run as the main service process, and the service manager will consider the unit started when the parent process exits. This is the behavior of traditional UNIX services. If this setting is used, it is recommended to also use the PIDFile= option, so that systemd can reliably identify the main process of the service. systemd will proceed with starting follow-up units as soon as the parent process exits.