Files
spinifex/scripts/images/rds-postgres/rds-datadir.initd
T
2026-07-29 10:38:22 +10:00

21 lines
713 B
Plaintext

#!/sbin/openrc-run
# rds-datadir — boot oneshot that discovers the hot-plugged data volume, formats
# it if new, and mounts it at the datadir mount point. First of the three RDS
# services, since rds-init's initdb targets a datadir this must mount. Ordered
# with `before`, not a dependency, so a missing volume fails visibly.
description="Spinifex RDS data volume mount"
depend() {
before rds-agent rds-init postgresql
after localmount
}
start() {
ebegin "Mounting the RDS data volume"
# To the console for the same reason rds-init's is: the serial log is the
# only view of a boot that failed before the engine came up.
/usr/local/sbin/rds-datadir > /dev/console 2>&1
eend $?
}