plausible: 1.5.1 -> 2.0.0

Changelog: https://github.com/plausible/analytics/blob/v2.0.0/CHANGELOG.md

Co-authored-by: Kirill Radzikhovskyy <kirillrdy@gmail.com>
This commit is contained in:
Robert Schütz 2023-09-06 12:00:20 -07:00
parent cd39cf1dbf
commit c4244c7aa3
5 changed files with 20 additions and 12113 deletions

View file

@ -248,11 +248,10 @@ in {
# setup
${cfg.package}/createdb.sh
${cfg.package}/migrate.sh
export IP_GEOLOCATION_DB=${pkgs.dbip-country-lite}/share/dbip/dbip-country-lite.mmdb
${cfg.package}/bin/plausible eval "(Plausible.Release.prepare() ; Plausible.Auth.create_user(\"$ADMIN_USER_NAME\", \"$ADMIN_USER_EMAIL\", \"$ADMIN_USER_PWD\"))"
${optionalString cfg.adminUser.activate ''
if ! ${cfg.package}/init-admin.sh | grep 'already exists'; then
psql -d plausible <<< "UPDATE users SET email_verified=true;"
fi
psql -d plausible <<< "UPDATE users SET email_verified=true where email = '$ADMIN_USER_EMAIL';"
''}
exec plausible start