13 lines
360 B
Desktop File
13 lines
360 B
Desktop File
[Unit]
|
|
Description=Manage %I for GPS daemon
|
|
Requires=gpsd.socket
|
|
BindsTo=dev-%i.device
|
|
After=dev-%i.device
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
EnvironmentFile=-/etc/sysconfig/gpsd
|
|
RemainAfterExit=yes
|
|
ExecStart=/bin/sh -c "[ \"$USBAUTO\" = true ] && /usr/sbin/gpsdctl add /dev/%I || :"
|
|
ExecStop=/bin/sh -c "[ \"$USBAUTO\" = true ] && /usr/sbin/gpsdctl remove /dev/%I || :"
|