Fixing install commands

This commit is contained in:
Zoe Roux
2021-04-10 17:45:36 +02:00
parent 0b9515249a
commit b13c2749fe
4 changed files with 22 additions and 14 deletions
-1
View File
@@ -72,7 +72,6 @@ jobs:
sudo install -Dm 644 deployment/kyoo.sysusers pkg/usr/lib/sysusers.d/kyoo.conf
sudo install -Dm 644 deployment/kyoo.tmpfiles pkg/usr/lib/tmpfiles.d/kyoo.conf
sudo install -Dm 755 deployment/postinst -t pkg/DEBIAN/
sudo install -Dm 755 deployment/postrm -t pkg/DEBIAN/
- uses: jiro4989/build-rpm-action@v2
with:
package: kyoo
+10 -7
View File
@@ -1,8 +1,11 @@
post_install() {
sudo -u postgres dropuser kyoo --if-exist
sudo -u postgres createuser -d kyoo
}
post_remove() {
sudo -u postgres dropuser kyoo --if-exist
}
sudo -u postgres psql <<- "EOF"
DO $$
BEGIN
CREATE ROLE kyoo WITH CREATEDB LOGIN PASSWORD 'kyooPassword';
EXCEPTION WHEN DUPLICATE_OBJECT THEN
RAISE NOTICE 'not creating role kyoo -- it already exists';
END
$$;
EOF
}
+12 -2
View File
@@ -1,5 +1,15 @@
#!/bin/sh
set -e
sudo -u postgres dropuser kyoo --if-exist
sudo -u postgres createuser -d kyoo
sudo -u postgres psql << "EOF"
DO $$
BEGIN
CREATE ROLE kyoo WITH CREATEDB LOGIN PASSWORD 'kyooPassword';
EXCEPTION WHEN DUPLICATE_OBJECT THEN
RAISE NOTICE 'not creating role kyoo -- it already exists';
END
$$;
EOF
systemd-sysusers
systemd-tmpfiles --create
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
set -e
sudo -u postgres dropuser kyoo --if-exist