pybackive/backive/backive_udev

16 lines
287 B
Plaintext
Raw Normal View History

2019-02-22 21:26:01 +01:00
#!/usr/bin/env python3
"""
Callable script for udev rules.
"""
2019-02-24 22:42:36 +01:00
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()