Sample systemd for github runner


sudo nano /etc/systemd/system/run-service.service

[Unit]
Description=Run Service
After=network.target

[Service]
ExecStart=/bin/bash -c "/path/to/run.sh"
WorkingDirectory=/path/to/working/directory
Restart=always
User= # Replace with the desired username

[Install]
WantedBy=multi-user.target

sudo systemctl enable run-service

sudo systemctl start run-service

Advertisement

Author: susiloharjo

Khoirunnas anfa'ahum linnas A Father, Husband and love to learn person Love my Family, Electronics, Photography, Robot, Dreaming, Programming

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: