mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-06 16:14:17 +00:00
fix: Pleroma startup
This commit is contained in:
parent
f678df0074
commit
c0f965fb8e
|
@ -110,6 +110,8 @@ in
|
||||||
--link \
|
--link \
|
||||||
--verbose
|
--verbose
|
||||||
|
|
||||||
|
touch "$newDataDir/.sp_migrated"
|
||||||
|
|
||||||
echo "PostgreSQL upgrade from 12 to 16 completed."
|
echo "PostgreSQL upgrade from 12 to 16 completed."
|
||||||
else
|
else
|
||||||
echo "No PostgreSQL 12 data directory detected or already upgraded. Skipping."
|
echo "No PostgreSQL 12 data directory detected or already upgraded. Skipping."
|
||||||
|
@ -119,8 +121,10 @@ in
|
||||||
# Start Pleroma only if pleromaEnabled is true
|
# Start Pleroma only if pleromaEnabled is true
|
||||||
ExecStartPost =
|
ExecStartPost =
|
||||||
optional cfg.pleromaEnabled "${pkgs.writeShellScript "postgresql-upgrade12to16-post.sh" ''
|
optional cfg.pleromaEnabled "${pkgs.writeShellScript "postgresql-upgrade12to16-post.sh" ''
|
||||||
if [ -d "${cfg.dataDir12}" ] && [ ! -d "${cfg.dataDir16}" ]; then
|
if test -e "${cfg.dataDir16}/.sp_migrated"; then
|
||||||
${pkgs.systemd}/bin/systemctl start --no-block pleroma.service
|
${pkgs.systemd}/bin/systemctl start --no-block pleroma.service
|
||||||
|
|
||||||
|
rm -f "${cfg.dataDir16}/.sp_migrated"
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
}";
|
}";
|
||||||
|
|
Loading…
Reference in a new issue