addresserver/README.md

35 lines
742 B
Markdown
Raw Permalink Normal View History

2019-03-30 17:26:51 +01:00
```
[Unit]
Description=My Python Server
2019-03-30 17:23:24 +01:00
After=syslog.target
[Service]
Type=simple
User=addressserver
Group=addressserver
WorkingDirectory=/home/addressserver/address_scanner
ExecStart=/usr/bin/python3 /home/addressserver/address_scanner/server.py
SyslogIdentifier=address_server
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
```
```
apt-get install python3-pip
pip3 install netifaces paho-mqtt
*/2 * * * * /usr/bin/python3 /root/scanner.py -i eth0 -4 192 -6 2a02 --host 192.168.25.221 --username mc8051 --password XXXXXXX -q
```
```
https://www.thomaschristlieb.de/ein-python-script-mit-systemd-als-daemon-systemd-tut-garnicht-weh/
https://stackoverflow.com/a/47370156
```