mirror of https://github.com/LX3JL/xlxd.git
Merge b5a84dc4a6 into 129f1257b4
commit
eea0e854ca
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if journalctl -u ambed.service --since "5min ago" --grep 'Device .* is unresponsive'; then
|
||||||
|
systemctl restart ambed.service
|
||||||
|
systemctl restart xlxd.service
|
||||||
|
fi
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Check ambedwatchdog
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/ambedwatchdog
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Contiously monitor ambed if it crashes
|
||||||
|
Requires=xlxd.service ambed.service
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* *:*:0/5
|
||||||
|
Unit=ambedwatchdog.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
/usr/bin/wget -q -O- http://localhost/index.php?callhome=1 > /dev/null
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=XLX API Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/xlxapi-update
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Run xlx api call every day (if nobody opens the dashboard)
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 1:0:0
|
||||||
|
Unit=xlxapi-update.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=XLX Reflector (XLX999)
|
||||||
|
After=network.target ambed.service
|
||||||
|
Requires=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
User=xlxd
|
||||||
|
Group=xlxd
|
||||||
|
AmbientCapabilities=CAP_NET_RAW
|
||||||
|
ExecStart=/xlxd/xlxd XLX999 1.2.3.4 127.0.0.1
|
||||||
|
Restart=on-abnormal
|
||||||
|
RestartSec=30
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
Reference in new issue