Systemctl: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "== systemctl == systemctl stop [service] systemctl start [service] systemctl restart [service] systemctl disable [service] systemctl enable [service] systemctl daemon-reload journalctl -xe jounralctl -u [service]")
 
No edit summary
Line 12: Line 12:
  journalctl -xe
  journalctl -xe
  jounralctl -u [service]
  jounralctl -u [service]
== /etc/systemd/system ==
/etc/systemd/system/github-runner.service
Ubuntu version:
<pre>
[Unit]
Description=GitHub Actions Runner
After=network.target
[Service]
User=root
WorkingDirectory=/opt/actions-runner
Environment="RUNNER_ALLOW_RUNASROOT=1"
ExecStart=/opt/actions-runner/run.sh
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
</pre>
RedHat version:
<pre>
[Unit]
Description=GitHub Actions Runner
After=network-online.target
[Service]
ExecStart=/opt/actions-runner/runsvc.sh
User=
WorkingDirectory=/opt/actions-runner
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target
</pre>

Revision as of 03:41, 4 August 2026

systemctl

systemctl stop [service]
systemctl start [service]
systemctl restart [service]
systemctl disable [service]
systemctl enable [service]
systemctl daemon-reload
journalctl -xe
jounralctl -u [service]

/etc/systemd/system

/etc/systemd/system/github-runner.service

Ubuntu version:

[Unit]
Description=GitHub Actions Runner
After=network.target

[Service]
User=root
WorkingDirectory=/opt/actions-runner
Environment="RUNNER_ALLOW_RUNASROOT=1"
ExecStart=/opt/actions-runner/run.sh
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

RedHat version:

[Unit]
Description=GitHub Actions Runner
After=network-online.target

[Service]
ExecStart=/opt/actions-runner/runsvc.sh
User=
WorkingDirectory=/opt/actions-runner
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min

[Install]
WantedBy=multi-user.target