Fixing PSQL setup

This commit is contained in:
Anton Hvornum 2019-06-20 16:51:42 +00:00
parent 430f5bda2e
commit 9e9c8e0051
1 changed files with 5 additions and 4 deletions

View File

@ -5,14 +5,15 @@
"packages" : "openssh sudo openvpn easy-rsa",
"post" : "stay",
"country" : "SE",
"mirrors" : true
"mirrors" : true,
"rerun" : "install database"
},
"post" : {
"install database": "postgresql",
"Configure database": {
"su - postgres -c \"psql -c \\\"CREATE DATABASE pdns;\\\"\"" : {"boot" : true, "debug" : true},
"su - postgres -c \"psql -c \\\"CREATE USER pdns WITH ENCRYPTED PASSWORD 'testpass';\\\"\"" : {"boot" : true, "debug" : true},
"su - postgres -c \"psql -c \\\"GRANT ALL PRIVILEGES ON DATABASE pdns TO pdns;\\\"\"" : {"boot" : true, "debug" : true}
"su - postgres -c 'psql -c \"CREATE DATABASE pdns;\"'" : {"boot" : true, "debug" : true},
"su - postgres -c 'psql -c \"CREATE USER pdns WITH ENCRYPTED PASSWORD 'testpass';\"'" : {"boot" : true, "debug" : true},
"su - postgres -c 'psql -c \"GRANT ALL PRIVILEGES ON DATABASE pdns TO pdns;\"'" : {"boot" : true, "debug" : true}
},
"Configure OpenVPN" : {
"mkdir -p /etc/openvpn/server/vpn_ccd" : null,