Skip to content

fixes make_directories to work at any time and integrate the symlink - #486

Merged
astronomerdave merged 1 commit into
mainfrom
bugfix/make-directories
Sep 30, 2026
Merged

astronomerdave merged 1 commit into
mainfrom
bugfix/make-directories

Conversation

@astronomerdave

Copy link
Copy Markdown
Contributor

This allows running a fallback at reboot in case the computer is not powered at noon.

Once merged and built, this requires the following changes:

  1. In dataowner's crontab, replace
# create data directories every day at noon
0 12 * * * exec /home/developer/bin/make_directories >/dev/null 2>&1
# then symlink /data/latest to the current /data/YYYYMMDD directory
1 12 * * * /home/developer/Software/run/symlink_latest >/dev/null 2>&1

with

# create data directories. must run at 12:00, before the daemons' 12:01
# log rotation; runs hourly as a fallback
0 * * * * /home/developer/bin/make_directories >/dev/null 2>&1
  1. Install a systemd oneshot that runs make_directories after /data is mounted and before the daemons start.

create file /etc/systemd/system/ngps-make-directories.service with

[Unit]
Description=Create /data/YYYYMMDD for the current night
RequiresMountsFor=/data
Before=ngps-daemon.service

[Service]
Type=oneshot
User=dataowner
Group=datawriters
UMask=0002
ExecStart=/home/developer/bin/make_directories

[Install]
WantedBy=ngps-daemon.service

then

sudo systemctl daemon-reload
sudo systemctl enable ngps-make-directories.service

This allows running a fallback at reboot in case the computer is
not powered at noon.
@astronomerdave
astronomerdave merged commit 5000ef2 into main Sep 30, 2026
2 checks passed
@astronomerdave

Copy link
Copy Markdown
Contributor Author

This was deployed on 2026-Sep-30 11:30AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants