Hi Hans
Following on from this mornings permission based issue which we sorted by enabling mono into the setup code, reminded me of a similar start up procedure in CMX and wondered if this could be utilised in CUtils.
After a bit of trial and error I created a new file cumulusutils.service in the CumulusMX/MXutils/linux folder, copied it into /etc/systemd/system/and then enabled the service. The attached file shows the detailed steps needed.
The end result is an automatic service to restart CUtils following a file upgrade with no infernal errors. I am not sure if this will interfer with other CUtils processes but at the moment it works for me.
Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
CUtils launch as a service
Moderator: HansR
-
- Posts: 717
- Joined: Thu 20 Aug 2020 8:35 am
- Weather Station: Davis VP2 Plus
- Operating System: RPiv4 64bit Linux 12 Bookworm
- Location: Jersey Channel Islands
- Contact:
CUtils launch as a service
You do not have the required permissions to view the files attached to this post.
- HansR
- Posts: 5957
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: CUtils launch as a service
Hi Andy,
Nice experiment
But:
What you made is the start/stop definition for systemd to tell it is has a daemon to look at, but the daemon as such is badly programmed as a daemon and won't function.
Nice idea though, as I said: there is functionality which could justify a daemon implementation but I don't think it will be done shortly.
Regards,
Nice experiment
But:
- Cutils has no code to run as a service and I have no idea what it will do but I think that as soon as it sees it has no argument it will stop.
- I am not sure what the systemd does with a stopped daemon but as no action for a stop is given it will probably disappear (check with htop the process is no longer running)
- What would you want to achieve as a service while there is no argument to CUtils?
- Cutils has no signal handling so how would you like to communicate with CUtils while in daemon loop?
- If your goal is to have mono permanently but it probably already is active (xsp4 and CumulusMX itself)
What you made is the start/stop definition for systemd to tell it is has a daemon to look at, but the daemon as such is badly programmed as a daemon and won't function.
Nice idea though, as I said: there is functionality which could justify a daemon implementation but I don't think it will be done shortly.
Regards,
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
-
- Posts: 717
- Joined: Thu 20 Aug 2020 8:35 am
- Weather Station: Davis VP2 Plus
- Operating System: RPiv4 64bit Linux 12 Bookworm
- Location: Jersey Channel Islands
- Contact:
Re: CUtils launch as a service
Hi Hans
As you say a nice experiment but on reflection and after the overnight thrifty website run not working I have killed and removed this service from the RPi. I think it may well cause more issues than it solved.
I am now back to the previous permission error fix which is completely workable and only needs to be done once when an upgrade is installed.
As you say a nice experiment but on reflection and after the overnight thrifty website run not working I have killed and removed this service from the RPi. I think it may well cause more issues than it solved.
I am now back to the previous permission error fix which is completely workable and only needs to be done once when an upgrade is installed.
- HansR
- Posts: 5957
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: CUtils launch as a service
Hi Andy,
OK, understood.
You can also invoke CUtils always preceded with 'mono'. Solves the issue as well.
Regards,
OK, understood.
You can also invoke CUtils always preceded with 'mono'. Solves the issue as well.
Regards,
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3