ajberchek / TopicsToLearn

0 stars 0 forks source link

Systemd #26

Open ajberchek opened 6 years ago

ajberchek commented 6 years ago

Created a SystemD service to restart the auto tester whenever it fails and automatically on boot

[Unit] Description=Service to monitor the NachOS repository for new PRs and other changes, then automatically test those changes on the school's server After=network.target

[Service] Type=simple User=ajberchek WorkingDirectory=/home/ajberchek ExecStart=/home/ajberchek/startScript.sh Restart=always RestartSec=3

[Install] WantedBy=multi-user.target

ajberchek commented 6 years ago

When creating a new service file and you want to add it in, reload the daemon with: sudo systemctl daemon-reload

Then start the service with: sudo systemctl start autoTester.service

ajberchek commented 6 years ago

Red hat walkthrough of systemD: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files