From Sweltering Eider, 4 Weeks ago, written in Plain Text.
  1. # AFTER REBOOT
  2.  
  3. gateway.service - Gateway service
  4.    Loaded: loaded (/lib/systemd/system/gateway.service; enabled;
  5. vendor preset: enabled)
  6.    Active: inactive (dead)
  7.  
  8. # MANUALLY ACTIVATING THE SERVICE
  9.  
  10. ● gateway.service - Gateway service
  11.    Loaded: loaded (/lib/systemd/system/gateway.service; enabled; vendor preset: enabled)
  12.    Active: active (running) since Mon 2019-05-20 04:21:58 SAST; 3s ago
  13.  Main PID: 1256 (python3)
  14.   CGroup: /system.slice/gateway.service
  15.            └─1256 /usr/bin/python3
  16. /home/pi/Desktop/RFM98_pylib/gateway.py
  17.  
  18. May 20 04:21:58 raspberrypi systemd[1]: Started Gateway service.
  19.  
  20. # CONFIG FILE
  21.  
  22. [Unit]
  23. Description=Gateway service
  24. Wants=network-online.target
  25. After=network-online.target
  26.  
  27.  
  28. [Service]
  29. Type=simple
  30. User=pi
  31. WorkingDirectory=/home/pi/Desktop/RFM98_pylib
  32. ExecStart= /usr/bin/python3 /home/pi/Desktop/RFM98_pylib/gateway.py
  33. Restart=on-failure
  34. RemainAfterExit=True
  35.  
  36. [Install]
  37. WantedBy=muti-user.target
captcha