pumount "${SECRETS_DEV}"
echo "You can remove ${PATH_DEV} now."
chown -R "${USERNAME}:${USERNAME}" "${PATH_SECRETS}"
-sudo -u "${USERNAME}" ./setup_secrets_user.sh "${SECRETS_PASS}"
+
+cd ../..
+PATH_REPO=$(pwd)
+CONTAINS_TICK=$(echo "${SECRETS_PASS}" | grep "'" | wc -l)
+if [ "${CONTAINS_TICK}" = "1" ]; then
+ echo "Cannot pass to user script passphrase with illegal character, aborting."
+ exit 1
+fi
+su -l "${USERNAME}" -c "cd ${PATH_REPO}/testing/scripts && ./setup_secrets_user.sh '${SECRETS_PASS}'"