Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add README instructions for OpenBSD installation #1672

Merged
merged 3 commits into from
Dec 6, 2016
Merged

Add README instructions for OpenBSD installation #1672

merged 3 commits into from
Dec 6, 2016

Conversation

williamleuschner
Copy link
Contributor

Signed-off-by: William Leuschner wel2138@rit.edu

Closes #1148

Signed-off-by: William Leuschner <wel2138@rit.edu>
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

4 similar comments
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@williamleuschner
Copy link
Contributor Author

Wow, @matrixbot; I think they got it...

1) Ensure that you have the Bourne Again Shell (``bash``) installed. The Korn
Shell (``ksh``), which is OpenBSD's default shell, does not support the
``source`` command necessary to activate the python virtualenv to be set up
later.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ksh does support "sourcing" files - it just uses the . syntax: . bin/activate for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't know that, and I guess I just forgot to try it when I was setting it up. Thanks!

@qbit
Copy link

qbit commented Dec 5, 2016

Also here is an example rc.d script:

cat /etc/rc.d/synapse                                                                                                                                                                        
#!/bin/sh

datadir="/usr/local/_synapse/.synapse"
daemon_flags="/usr/local/_synapse/.synapse/homeserver.yaml"
daemon="${datadir}/bin/synctl"
daemon_user="_synapse"

. /etc/rc.d/rc.subr
. ${datadir}/bin/activate

rc_reload=NO
rc_usercheck=NO

pexp="/usr/local/_synapse/.synapse/bin/python.*"

rc_start() {
        ${rcexec} "${daemon} start ${daemon_flags}"
}

rc_stop() {
        ${rcexec} "${daemon} stop ${daemon_flags}"
}

rc_restart() {
        ${rcexec} "${daemon} restart ${daemon_flags}"
}

rc_cmd $1

@erikjohnston
Copy link
Member

Thanks for this! Does @qbit's suggestion of . bin/activate work?

Signed-off-by: William Leuschner <wel2138@rit.edu>
@williamleuschner
Copy link
Contributor Author

williamleuschner commented Dec 6, 2016

@erikjohnston Yes, it does. I've tested it and updated my README changes accordingly.

Should I also add the rc.d script to my pull request as well?

There is currently no port for OpenBSD. Additionally, OpenBSD's security
settings require a slightly more difficult installation process.

2) Create a new directory in ``/usr/local`` called ``_synapse``. Also, create a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to start at 1 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely forgot that.. Whoops!

…mpetence

Signed-off-by: William Leuschner <wel2138@rit.edu>
@erikjohnston erikjohnston merged commit 0d81e26 into matrix-org:develop Dec 6, 2016
richvdh added a commit that referenced this pull request Jan 13, 2017
Fix formatting blooper introduced in #1672 :/
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants