jamesrwhite / minicron

🕰️ Monitor your cron jobs
GNU General Public License v3.0
2.34k stars 154 forks source link

Postgresql DB Setup Failing #297

Open Izzy87 opened 6 years ago

Izzy87 commented 6 years ago

Hello, can anyone advise me on the correct process for the installation of Minicron with Postgresql.

Currently, I log into PSQL and create a new "minicron" user (also granting Create DB privilege), and then create a Database manually called "minicrondb" with ownership set to the "minicron" user. I change /etc/minicron.toml to access Postgresql with the new relevant Database/User/Password information, then upon using minicron db setup I get this error: FATAL: database "minicron" does not exist

It's like the new TOML database name isn't being acknowledged. If I change the TOML database name to just "minicron" to match the default, and alter the database name to "minicron", I then get this error:

PG::DuplicateDatabase: ERROR:  database "minicron" already exists
: CREATE DATABASE "minicron" ENCODING = 'utf8'

Seems like a new issue to me, this one suggesting I don't need to create a database manually at all, but if I DROPDB (but keeping the "minicron" user with CREATEDB privilege) and then run again minicron db setup I get the FATAL: database "minicron" does not exist error again, seemingly contrary to the DuplicateDatabase error above.

Any ideas? My PC already runs postgresql for another application, so presumably it's more efficient than using sqlite (which for the record, does seem to work).

PS: It's true, I am a Crontab-UI refugee, I had no joy getting that to run recently, so here I am!