aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbobpaul2020-02-17 16:44:04 -0600
committerbobpaul2020-02-17 16:44:49 -0600
commit4a9e3ddfae525ccc2716d0cc624da3417f496ffb (patch)
tree942e4ef0f3c0e3cb68fd0620730c07c52fb6ff57
parent2c9f6d9b579d4f49d2c5baa6f7b0d2388d0d5e18 (diff)
downloadaur-4a9e3ddfae525ccc2716d0cc624da3417f496ffb.tar.gz
Fixed an issue with -->
This script is super gross, should probably be in /usr/bin, but mostly shouldn't need to exist
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD2
-rw-r--r--setup.sh30
3 files changed, 48 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 426d74825fae..69ca4d592ffd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -27,3 +27,32 @@ pkgbase = matrix-puppet-hangouts-git
pkgname = matrix-puppet-hangouts-git
+pkgbase = matrix-puppet-hangouts-git
+ pkgdesc = Single user Node.js Hangouts bridge for Matrix-Synapse <1.10.x
+ pkgver = r57.b055642
+ pkgrel = 2
+ arch = any
+ license = Apache
+ makedepends = npm
+ makedepends = git
+ depends = nodejs
+ depends = hangups-git
+ optdepends = python: for maintenance scripts
+ optdepends = matrix-synapse<1.10.0: if also hosting a homeserver
+ conflicts = matrix-puppet-hangouts
+ conflicts = matrix-synapse>=1.10.0
+ source = matrix-puppet-hangouts::git+https://github.com/matrix-hacks/matrix-puppet-hangouts
+ source = README
+ source = setup.sh
+ source = config-paths.patch
+ source = hangups_manual_login.py
+ source = matrix-puppet-hangouts@.service
+ sha256sums = SKIP
+ sha256sums = 69aaa542079a8fa4a4ac73a0598acef5d2991a24b657af987c13014ee96e21e0
+ sha256sums = 19bc3e24513c0c580dc862f2fc14f40baff9b4d2b09280586014042af32881bf
+ sha256sums = 7e17b23c7f23558e1cdee0bd3e3c0820c91ac1f05a2b7ce7edcbc750413aa371
+ sha256sums = 39ef6f75eed3c743bafc3974e83a8916446120985a5e2b39f9c6aa70abfbe585
+ sha256sums = e80f54718c308237eeae039326c69e6b599c6578db3ed72ab7b79d2f8e1c38d6
+
+pkgname = matrix-puppet-hangouts-git
+
diff --git a/PKGBUILD b/PKGBUILD
index 68143e64c700..53dc2d5b282f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,7 +22,7 @@ source=("${_pkgbase}::git+https://github.com/matrix-hacks/${_pkgbase}"
"${_pkgbase}@.service")
sha256sums=('SKIP'
'69aaa542079a8fa4a4ac73a0598acef5d2991a24b657af987c13014ee96e21e0'
- 'd59a393341a1b4a9843cb61374ddad42ed9d2790acb7903f8dd1619c73b81515'
+ '19bc3e24513c0c580dc862f2fc14f40baff9b4d2b09280586014042af32881bf'
'7e17b23c7f23558e1cdee0bd3e3c0820c91ac1f05a2b7ce7edcbc750413aa371'
'39ef6f75eed3c743bafc3974e83a8916446120985a5e2b39f9c6aa70abfbe585'
'e80f54718c308237eeae039326c69e6b599c6578db3ed72ab7b79d2f8e1c38d6')
diff --git a/setup.sh b/setup.sh
index 2464837841a2..b82bc5cf430c 100644
--- a/setup.sh
+++ b/setup.sh
@@ -5,29 +5,35 @@ REG=${2:-no}
URL=${3:-http://localhost:8090}
RUNAS=${RUNAS:-synapse}
-if [[ "${USER}" = "none" ]] || [[ "${USER}" = "" ]] || [[ "${USER}" = "--register" ]]; then
+if [[ "${USER}" = "none" ]] || [[ "${USER}" = "" ]] ||\
+ [[ "${USER}" = "--register" ]] || [[ "${USER}" = "--help" ]] ||\
+ [[ "${REG}" = "--help" ]] || [[ "${URL}" = "--help" ]]; then
echo 'USER required'
echo ''
- echo 'usage $0 USER [--register [URL]]'
- echo '--register - generates registation.yaml file. Must edit config json first!!'
+ echo "usage $0 USER [--register [URL]]"
+ echo '--register - generates registation-USER.yaml file. Must edit config json first!!'
echo ' URL tells synapse how to reach the puppet daemon.'
echo ' defaults to http://localhost:8090'
echo ''
- echo 'Sets up some folders/symlinks to make up for a lack of configurability'
- echo 'in matrix-puppet-hangouts. After running this script, edit '
- echo ' /etc/synapse/matrix-puppet-hangouts/config-USER.json'
- echo 'Log into hangups and place the token in '
- echo ' /etc/synapse/matrix-puppet-hangouts/refresh_token-USER.txt'
- echo 'And place registration in'
- echo ' /etc/synapse/matrix-puppet-hangouts/registration-USER.yaml'
- echo 'Note that the registration path also goes in config-USER.json'
+ echo 'If only USER is provided:'
+ echo ' Sets up some folders/symlinks to make up for a lack of configurability'
+ echo ' in matrix-puppet-hangouts. After running this script, edit '
+ echo ' /etc/synapse/matrix-puppet-hangouts/config-USER.json'
+ echo ' Log into hangups and place the token in '
+ echo ' /etc/synapse/matrix-puppet-hangouts/refresh_token-USER.txt'
+ echo ' And place registration in'
+ echo ' /etc/synapse/matrix-puppet-hangouts/registration-USER.yaml'
+ echo ' Note that the registration path also goes in config-USER.json'
exit 1
fi
if [[ ${REG} = "--register" ]]; then
echo "Registering a puppet on ${URL}"
-sudo -u synapse HOME=/var/lib/matrix-puppet-hangouts/${USER}/ \
+sudo chown ${RUNAS}:${RUNAS} /etc/synapse/matrix-puppet-hangouts/config-${USER}.json
+sudo chmod u+rw /etc/synapse/matrix-puppet-hangouts/config-${USER}.json
+sudo -u ${RUNAS} HOME=/var/lib/matrix-puppet-hangouts/${USER}/ \
node /usr/lib/node_modules/matrix-puppet-hangouts/index.js -r -u "${URL}"
+sudo chown root:root /etc/synapse/matrix-puppet-hangouts/config-${USER}.json
else
echo Running initial setup