16 lines
287 B
Python
16 lines
287 B
Python
#!/usr/bin/env python3
|
|
|
|
"""
|
|
Callable script for udev rules.
|
|
"""
|
|
import socket
|
|
import sys
|
|
|
|
unix_socket = "/tmp/backive/backive.sock"
|
|
|
|
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
sock.connect(unix_socket)
|
|
if len(sys.argv) > 1:
|
|
sock.send(sys.argv[1].encode())
|
|
sock.close()
|