Added installapp-sso

This commit is contained in:
root 2024-08-13 19:16:46 +00:00
parent ff15cae0a4
commit 41a8fa3faa

7
bin/installappsso → bin/installapp-sso Executable file → Normal file
View File

@ -1,16 +1,16 @@
#!/bin/bash -x #!/bin/bash -x
# #
# Installs configuration for SSO on specified application # Installs SSO on app
. /etc/federated . /etc/federated
. /federated/lib/functions.sh . /federated/lib/functions.sh
trap cleanup `seq 1 15` trap cleanup `seq 1 15`
usage() { usage() {
cat << EOF cat << EOF
Install application SSO configuration Install application
Usage: $0 appname Usage: $0 appname
Arguments: Arguments:
appname Application SSO config to install. nextcloud,bookstack,matrix,etc appname Application to install SSO. bookstack,espocrm,freescout,etc
EOF EOF
exit 2; exit 2;
@ -20,5 +20,6 @@ exit 2;
APP=$1 APP=$1
[ ! -f /federated/lib/$APP.sh ] && failcheck "/federated/lib/$APP.sh doesn't exist." [ ! -f /federated/lib/$APP.sh ] && failcheck "/federated/lib/$APP.sh doesn't exist."
[ ! -d /federated/apps/$APP ] && failcheck "/federated/apps/$APP doesn't exist. Is $APP is installed?"
. /federated/lib/$APP.sh . /federated/lib/$APP.sh
configsso_$APP configsso_$APP