Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #256085
| From | "pyh@ymail.ne.jp" <pyh@ymail.ne.jp> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: auto restarting in crontab |
| Date | 2023-03-16 05:10 +0100 |
| Message-ID | <G9N69-cNFg-1@gated-at.bofh.it> (permalink) |
| References | <G9K8h-cLqL-1@gated-at.bofh.it> <G9KhX-cLJE-1@gated-at.bofh.it> <G9KKZ-cLTw-1@gated-at.bofh.it> <G9KUF-cLYt-1@gated-at.bofh.it> <G9MWt-cNmM-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Just for fun, I asked this question on ChatGPT, who gives the answers as follows. Q: Please help generate a systemd configuration for Debian linux A: Sure, here's an example of a systemd configuration file for a Debian Linux service: ``` [Unit] Description=My Service After=network.target [Service] Type=simple Restart=always RestartSec=5s ExecStart=/usr/bin/my-service [Install] WantedBy=multi-user.target ``` In this example, replace `My Service` with the name of your service, and `/usr/bin/my-service` with the path to your service's executable. Save this file with a `.service` extension, for example, `my-service.service`, and place it in the `/etc/systemd/system` directory. Then, enable the service using the following command: ``` systemctl enable my-service.service ``` This will cause the service to start automatically at boot time. You can start, stop, and restart the service using the following commands: ``` systemctl start my-service.service systemctl stop my-service.service systemctl restart my-service.service ``` You can also view the logs of the service using the following command: ``` journalctl -u my-service.service ``` This will show the logs for your service. Thanks Yong pyh@ymail.ne.jp wrote: > > > coreyh@free.fr wrote: >> where will I setup this script for systemd job? any reference? > > You might look at this article as well. > https://linuxhandbook.com/create-systemd-services/ > > Yong >
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
auto restarting in crontab coreyh@free.fr - 2023-03-16 02:00 +0100
Re: auto restarting in crontab Nicholas Geovanis <nickgeovanis@gmail.com> - 2023-03-16 02:10 +0100
Re: auto restarting in crontab Greg Wooledge <greg@wooledge.org> - 2023-03-16 02:40 +0100
Re: auto restarting in crontab coreyh@free.fr - 2023-03-16 02:50 +0100
Re: auto restarting in crontab Greg Wooledge <greg@wooledge.org> - 2023-03-16 04:20 +0100
Re: auto restarting in crontab coreyh@free.fr - 2023-03-16 07:30 +0100
Re: auto restarting in crontab "pyh@ymail.ne.jp" <pyh@ymail.ne.jp> - 2023-03-16 05:00 +0100
Re: auto restarting in crontab "pyh@ymail.ne.jp" <pyh@ymail.ne.jp> - 2023-03-16 05:10 +0100
Re: auto restarting in crontab Jeremy Ardley <jeremy@ardley.org> - 2023-03-16 06:00 +0100
Re: auto restarting in crontab Nicolas George <george@nsup.org> - 2023-03-16 09:00 +0100
Re: auto restarting in crontab Greg Wooledge <greg@wooledge.org> - 2023-03-16 12:10 +0100
Re: auto restarting in crontab Nicolas George <george@nsup.org> - 2023-03-16 12:10 +0100
Re: auto restarting in crontab Greg Wooledge <greg@wooledge.org> - 2023-03-16 12:30 +0100
Re: auto restarting in crontab Christoph Brinkhaus <c.brinkhaus@t-online.de> - 2023-03-16 14:00 +0100
Re: auto restarting in crontab Greg Wooledge <greg@wooledge.org> - 2023-03-16 14:10 +0100
Re: auto restarting in crontab Nicolas George <george@nsup.org> - 2023-03-16 14:20 +0100
Re: Re: auto restarting in crontab pyh@ymail.ne.jp - 2023-03-16 17:30 +0100
Re: auto restarting in crontab Dan Ritter <dsr@randomstring.org> - 2023-03-16 18:40 +0100
Re: auto restarting in crontab Jude DaShiell <jdashiel@panix.com> - 2023-03-16 19:00 +0100
Re: auto restarting in crontab debian-user@howorth.org.uk - 2023-03-16 23:20 +0100
Re: auto restarting in crontab Dan Ritter <dsr@randomstring.org> - 2023-03-17 00:10 +0100
Re: auto restarting in crontab Jeffrey Walton <noloader@gmail.com> - 2023-03-17 00:40 +0100
Re: auto restarting in crontab Nicolas George <george@nsup.org> - 2023-03-17 13:20 +0100
Re: auto restarting in crontab debian-user@howorth.org.uk - 2023-03-17 13:20 +0100
Re: auto restarting in crontab "pyh@ymail.ne.jp" <pyh@ymail.ne.jp> - 2023-03-17 01:10 +0100
Re: auto restarting in crontab Greg Wooledge <greg@wooledge.org> - 2023-03-17 01:20 +0100
Re: auto restarting in crontab debian-user@howorth.org.uk - 2023-03-17 13:30 +0100
Re: auto restarting in crontab Christoph Brinkhaus <c.brinkhaus@t-online.de> - 2023-03-16 12:30 +0100
csiph-web