summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSky Swimmer2021-07-06 12:36:15 +0200
committerSky Swimmer2021-07-06 12:36:15 +0200
commit1a8eedb16fd308ace3861bb15846444fd2a6c05f (patch)
tree86f5951ed008820fa03d5791b8a44444a2151061
parent908df602eb870df3dd310f0f7b628e979796d563 (diff)
downloadaur-1a8eedb16fd308ace3861bb15846444fd2a6c05f.tar.gz
Improve install script
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--main.install8
3 files changed, 8 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0ff8dbd6373f..414c81cc3e55 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = saltedauth
pkgdesc = SaltedAuth -- More secure credential manager for Connective http servers.
pkgver = 1.0.0
- pkgrel = 1
+ pkgrel = 2
install = main.install
arch = any
license = GPL
diff --git a/PKGBUILD b/PKGBUILD
index a220bc45c2d6..9ce2f4645dda 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=saltedauth
pkgver=1.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="SaltedAuth -- More secure credential manager for Connective http servers."
arch=( 'any' )
url=""
diff --git a/main.install b/main.install
index 0e92c3bbc011..c065a8145f39 100644
--- a/main.install
+++ b/main.install
@@ -17,7 +17,9 @@ post_install() {
cp "/usr/lib/salted/SaltedAuth.jar" "$serverDir/modules/SaltedAuth.jar" -f
chown connective "$serverDir/modules/SaltedAuth.jar"
- cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg .modules.UserManager &>/dev/null && cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg . -s modules.UserManager.authentication-backend salted --ccfg-output --output "$serverDir"/server.ccfg
+ if [ -f "$serverDir"/server.ccfg ]; then
+ cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg .modules.UserManager &>/dev/null && cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg . -s modules.UserManager.authentication-backend salted --ccfg-output --output "$serverDir"/server.ccfg
+ fi
}
post_remove() {
@@ -35,5 +37,7 @@ post_remove() {
rm -f "$serverDir/.credtool.target"
rm -f "$serverDir/modules/SaltedAuth.jar"
- cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg .modules.UserManager &>/dev/null && cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg . -s modules.UserManager.authentication-backend credtool --ccfg-output --output "$serverDir"/server.ccfg
+ if [ -f "$serverDir"/server.ccfg ]; then
+ cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg .modules.UserManager &>/dev/null && cq org.asf.connective.standalone.main.ConnectiveConfiguration --source-jar /usr/lib/connective-http/ConnectiveStandalone.jar --source-jar /usr/lib/connective-http/libs/RatsMemory.jar "$serverDir"/server.ccfg . -s modules.UserManager.authentication-backend credtool --ccfg-output --output "$serverDir"/server.ccfg
+ fi
}