mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
diaspora: Disabled SSL
Created a custom command in Plinth to disable ssl for the diaspora pod on the freedombox.
This commit is contained in:
parent
d269a0a645
commit
742fe48a29
@ -36,18 +36,23 @@ def parse_arguments():
|
|||||||
'pre-install',
|
'pre-install',
|
||||||
help='Preseed debconf values before packages are installed.')
|
help='Preseed debconf values before packages are installed.')
|
||||||
|
|
||||||
# Preseed debconf values before packages are installed.
|
|
||||||
|
|
||||||
# pre_install.add_argument(
|
|
||||||
# '--thirdpartyservices',
|
|
||||||
# help='Third party services enabled: Facebook, Twitter, Tumblr, Wordpress')
|
|
||||||
|
|
||||||
subparsers.add_parser('enable', help='Enable diaspora*')
|
subparsers.add_parser('enable', help='Enable diaspora*')
|
||||||
subparsers.add_parser('disable', help='Disable diaspora*')
|
subparsers.add_parser('disable', help='Disable diaspora*')
|
||||||
|
subparsers.add_parser('disable-ssl', help="Disable SSL on the diaspora* application server")
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def subcommand_disable_ssl(_):
|
||||||
|
"""
|
||||||
|
Disable ssl in the diaspora configuration
|
||||||
|
as the apache server takes care of ssl
|
||||||
|
"""
|
||||||
|
subprocess.call(["sed", "-i",
|
||||||
|
"s/#require_ssl: true/require_ssl: false/g",
|
||||||
|
"/etc/diaspora/diaspora.yml"])
|
||||||
|
|
||||||
|
|
||||||
def subcommand_pre_install(arguments):
|
def subcommand_pre_install(arguments):
|
||||||
"""Pre installation configuration for diaspora"""
|
"""Pre installation configuration for diaspora"""
|
||||||
presets= [
|
presets= [
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
Location "/diaspora">
|
<Location "/diaspora">
|
||||||
ProxyPass "unix:/var/run/diaspora/diaspora.sock|http://localhost"
|
ProxyPass "unix:/var/run/diaspora/diaspora.sock|http://localhost"
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
|
# TODO This is temporary. Remove this
|
||||||
|
<Location "/podmin">
|
||||||
|
ProxyPass "unix:/var/run/diaspora/diaspora.sock|http://freedombox/podmin"
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
Alias "/assets" "/usr/share/diaspora/public/assets"
|
||||||
@ -15,6 +15,8 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from plinth import actions, action_utils, cfg, frontpage, service as service_module
|
from plinth import actions, action_utils, cfg, frontpage, service as service_module
|
||||||
@ -65,6 +67,7 @@ def setup(helper, old_version=None):
|
|||||||
"""Install and configure the module."""
|
"""Install and configure the module."""
|
||||||
helper.call('pre', actions.superuser_run, 'diaspora', ['pre-install'])
|
helper.call('pre', actions.superuser_run, 'diaspora', ['pre-install'])
|
||||||
helper.install(managed_packages)
|
helper.install(managed_packages)
|
||||||
|
helper.call('custom_config', actions.superuser_run, 'diaspora', ['disable-ssl'])
|
||||||
helper.call('post', actions.superuser_run, 'diaspora', ['enable'])
|
helper.call('post', actions.superuser_run, 'diaspora', ['enable'])
|
||||||
global service
|
global service
|
||||||
if service is None:
|
if service is None:
|
||||||
@ -81,6 +84,7 @@ def setup(helper, old_version=None):
|
|||||||
|
|
||||||
|
|
||||||
def add_shortcut():
|
def add_shortcut():
|
||||||
|
"""Add shortcut to diaspora on the Plinth homepage"""
|
||||||
frontpage.add_shortcut(
|
frontpage.add_shortcut(
|
||||||
'diaspora', title, url='/diaspora', login_required=True)
|
'diaspora', title, url='/diaspora', login_required=True)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user