Mostrando postagens com marcador systemd. Mostrar todas as postagens
Mostrando postagens com marcador systemd. Mostrar todas as postagens

Start service in low port whitout root

 

Locate the systemd file of that service:

pico /usr/lib/systemd/system/grafana-server


Add this 2 lines at service


[Service]


AmbientCapabilities = CAP_NET_BIND_SERVICE
CapabilityBoundingSet = CAP_NET_BIND_SERVICE

Run:
systemctl daemon-reload 


Restart service

Create linux systemd service


Create the file
/etc/systemd/system/routes.service


File content:

[Unit]
Description=Routes
After=multi-user.target

[Service]
Type=idle
ExecStart=/etc/init.d/routes.sh

[Install]
WantedBy=multi-user.target


Now lets enable service:
systemctl enable routes.service

If your script have start/stop options, change the ExecStart:
ExecStart=/etc/init.d/routes.sh start
ExecStop=/etc/init.d/routes.sh stop


Monitoring response time with curl

   curl -s -o /dev/null -w "Conecction: %{time_connect}s | Start transfer: %{time_starttransfer}s | Total time: %{time_total}s\n" ...

Mais vistos