Configure Owncloud for onion site
This commit is contained in:
parent
802358b9a2
commit
9ca2b81125
|
@ -5597,6 +5597,30 @@ function add_ddns_domain {
|
|||
CURRENT_DDNS_DOMAIN=
|
||||
}
|
||||
|
||||
function configure_owncloud_onion_site {
|
||||
if [ ! $OWNCLOUD_DOMAIN_NAME ]; then
|
||||
return
|
||||
fi
|
||||
if [ ! -f /etc/owncloud/config.php ]; then
|
||||
return
|
||||
fi
|
||||
if [ ! -f /var/lib/tor/hidden_service_owncloud/hostname ]; then
|
||||
return
|
||||
fi
|
||||
OWNCLOUD_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_owncloud/hostname)
|
||||
if ! grep -q "${OWNCLOUD_ONION_HOSTNAME}" /etc/owncloud/config.php; then
|
||||
sed -i "s|0 => '${OWNCLOUD_DOMAIN_NAME}',|0 => '${OWNCLOUD_DOMAIN_NAME}',
|
||||
1 => '${OWNCLOUD_ONION_HOSTNAME}',|g" /etc/owncloud/config.php
|
||||
sed -i "s|'writable' => false,|'writable' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'path' => '/usr/share/owncloud/apps',
|
||||
'url' => '/apps',
|
||||
'writable' => false,|g" /etc/owncloud/config.php
|
||||
fi
|
||||
}
|
||||
|
||||
function install_owncloud {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
|
@ -9296,6 +9320,7 @@ install_web_server
|
|||
configure_firewall_for_web_server
|
||||
install_owncloud
|
||||
install_owncloud_music_app
|
||||
configure_owncloud_onion_site
|
||||
install_gogs
|
||||
install_xmpp
|
||||
install_tox_node
|
||||
|
|
Loading…
Reference in New Issue