systemd weewx V5 using mysql waits for mysql to start

56 views
Skip to first unread message

Greg

unread,
Jul 20, 2023, 5:58:57 AM7/20/23
to weewx-development
I am using weewx V5 and also using msql (mariadb) and after a reboot weewx has to wait until mysql starts.

I have added After=time-sync.target mariadb.service to the systemd service file.

Could this be added to the weewx-data/util/systemd/weewx.service file maybe as a comment for other users of mysql?


# systemd unit configuration file for WeeWX
#
# For information about running WeeWX under systemd,
# be sure to read https://github.com/weewx/weewx/wiki/systemd
#
[Unit]
Description=WeeWX weather system
Documentation=https://weewx.com/docs

Requires=time-sync.target
After=time-sync.target mariadb.service
RequiresMountsFor=/opt

[Service]
ExecStart=/opt/weewx/weewx-venv/bin/python3 /opt/weewx/weewx-venv/lib/python3.11/site-packages/weewxd.py /opt/weewx/weewx-data/weewx.conf
StandardOutput=null
# To run as a non-root user, set the username and group here:
#User=user
#Group=user

[Install]
WantedBy=multi-user.target

Tom Keffer

unread,
Jul 20, 2023, 7:49:10 AM7/20/23
to Greg, weewx-development
Yes. Good idea.

However, I'm not sure that these databases routinely install with a systemd service file. For example, the machine I'm working on now uses a /etc/init.d file for MySQL. 

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/0a3fab00-428c-42ac-bce0-383223f187c5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages