This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e "\e[97mPlease enter password for Synapse/Matrix root user:\e[0m"; | |
read -s password | |
echo -e "\e[97mEnter user you'd like to deactivate\e[0m"; | |
read user | |
url_user=`echo -n "$user" | jq -s -R -r @uri` | |
json=`curl -s --insecure -XPOST -d '{"type":"m.login.password", "user":"root", "password":"'$password'"}' "https://localhost:8448/_matrix/client/r0/login"` | |
access_token=`echo "$json" | jq -r ".access_token"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
# | |
# Usage: ./imapsync.sh accounts.csv | |
# | |
# CSV account schema: | |
# old_username;old_password;new_username;new_password | |
# | |
<?php | |
define('HOST_FROM', 'imap.example.com'); |