Compare commits
2 Commits
eb345fd85f
...
14b35f8bb8
| Author | SHA1 | Date | |
|---|---|---|---|
| 14b35f8bb8 | |||
| e1dd5cc62a |
@@ -102,9 +102,9 @@ fi
|
||||
rm -f ${WALLETPATH_CFG}/*.*
|
||||
|
||||
#Always restore configuration with defaults
|
||||
cp -f kwalletrc $HOME/.config/
|
||||
chown $SUDO_USER:$SUDO_USER $HOME/.config/kwalletrc
|
||||
chmod u=rw,og-rwx $HOME/.config/kwalletrc
|
||||
cp -f kwalletrc $SUDO_HOME/.config/
|
||||
chown $SUDO_USER:$SUDO_USER $SUDO_HOME/.config/kwalletrc
|
||||
chmod u=rw,og-rwx $SUDO_HOME/.config/kwalletrc
|
||||
|
||||
#Bind mount secure folder to wallet directory
|
||||
echo "Mounting secure ${WALLETPATH} to wallet-directory ${WALLETPATH_CFG}"
|
||||
|
||||
@@ -44,7 +44,7 @@ elog_add_command() {
|
||||
#Run a command, capture output (STD and ERR) to the logfile AND output to screen
|
||||
# WILL NOT SET RETTXT to make Output directly to screen
|
||||
#Returns the exit value of the command in $? and in RETNO
|
||||
$@ | tee -a ${LOGFILE}
|
||||
$@ 2>&1 | tee -a ${LOGFILE}
|
||||
RETNO=$?
|
||||
return ${RETNO}
|
||||
}
|
||||
@@ -78,6 +78,9 @@ get_nc_token() {
|
||||
fi
|
||||
|
||||
if [ ! -f ${DAVTOKENFILENAME} ]; then
|
||||
echo "No token found here. Getting a new WEBDAV Token for this Device."
|
||||
echo "Please logon to your Nextcloud instance via SSO/kerberos"
|
||||
|
||||
# Directory is ok, but no Tokenfile was found, need to generate a new one
|
||||
REQJSON=$( curl -s -A "WEBDAV:${HOSTNM}" -X POST "https://${SERVERFQDN_NC}/index.php/login/v2" )
|
||||
# echo "JSON is:"
|
||||
@@ -96,6 +99,7 @@ get_nc_token() {
|
||||
if [[ "${POLLJSON}" == *"appPassword"* ]]; then
|
||||
echo "${POLLJSON}" > ${DAVTOKENFILENAME}
|
||||
echo "found token. Token has been written to ${DAVTOKENFILENAME}"
|
||||
pkill firefox
|
||||
break
|
||||
else
|
||||
echo "failed"
|
||||
|
||||
Reference in New Issue
Block a user