Merge branch 'stretch' of https://github.com/bashrc/freedombone
2
Makefile
|
@ -20,6 +20,7 @@ install:
|
|||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
mkdir -p ${DESTDIR}/usr/share/${APP}/base
|
||||
mkdir -p ${DESTDIR}/usr/share/${APP}/apps
|
||||
mkdir -p ${DESTDIR}/usr/share/${APP}/android-app
|
||||
mkdir -p ${DESTDIR}/usr/share/${APP}/utils
|
||||
mkdir -p ${DESTDIR}/usr/share/${APP}/avatars
|
||||
mkdir -p ${DESTDIR}/etc/${APP}
|
||||
|
@ -46,6 +47,7 @@ install:
|
|||
cp man/*.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
cp man/${APP}-backup-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/backup.1.gz
|
||||
cp man/${APP}-restore-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/restore.1.gz
|
||||
cp img/android-app/*.png ${DESTDIR}/usr/share/${APP}/android-app
|
||||
chown -R root: /usr/share/${APP}
|
||||
chmod -R +r /usr/share/${APP}
|
||||
# bash -c "./translate install"
|
||||
|
|
|
@ -23,6 +23,4 @@ Select *Administrator controls* then *App Settings* then *dlna*. From there you
|
|||
|
||||
The system will scan the /Music/ directory, which could take a while if there are thousands of files, but you don't need to do anything further other than perhaps to log out by selecting *Exit* a couple of times.
|
||||
|
||||
If you have an Android device then go to F-Droid (if you don't already have it installed then it can be [[https://f-droid.org/][downloaded here]]) and search for *ControlDLNA*. On running the app you should see a red Debian icon which you can press on, then you may need to select "local". After a few seconds the list of albums or tracks should then appear and you can browse and play them.
|
||||
|
||||
The DLNA service will only work within your local home network, and isn't remotely accessible from other locations via the internet. That can be both a good and a bad thing. Another consideration is that there are /no access controls/ on DLNA services, so any music or videos on the USB drive will be playable by anyone within your home network.
|
||||
|
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 30 KiB |
|
@ -267,5 +267,6 @@ if [[ "$1" == "add-all" ]]; then
|
|||
else
|
||||
install_apps_selected
|
||||
fi
|
||||
android_update_apps
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -40,6 +40,10 @@ AKAUNTING_ADMIN_PASSWORD=
|
|||
|
||||
AKAUNTING_BACKGROUND_IMAGE_URL=
|
||||
|
||||
AKAUNTING_SHORT_DESCRIPTION=$'Personal accounting'
|
||||
AKAUNTING_DESCRIPTION=$'Personal or small business accounting'
|
||||
AKAUNTING_MOBILE_APP_URL=
|
||||
|
||||
akaunting_variables=(ONION_ONLY
|
||||
AKAUNTING_DOMAIN_NAME
|
||||
AKAUNTING_CODE
|
||||
|
|
|
@ -35,6 +35,10 @@ BLUDIT_ONION_PORT=9844
|
|||
BLUDIT_REPO="https://github.com/bludit/bludit"
|
||||
BLUDIT_COMMIT='0e27e31a84421b3e6bd000a77bc89c2dff3c446a'
|
||||
|
||||
BLUDIT_SHORT_DESCRIPTION=$'Bludit Blog'
|
||||
BLUDIT_DESCRIPTION=$'Simple Markdown blogging'
|
||||
BLUDIT_MOBILE_APP_URL=
|
||||
|
||||
bludit_variables=(ONION_ONLY
|
||||
BLUDIT_DOMAIN_NAME
|
||||
BLUDIT_CODE
|
||||
|
|
|
@ -31,6 +31,10 @@ VARIANTS='full full-vim media'
|
|||
IN_DEFAULT_INSTALL=0
|
||||
SHOW_ON_ABOUT=0
|
||||
|
||||
DLNA_SHORT_DESCRIPTION=$'DLNA media'
|
||||
DLNA_DESCRIPTION=$'DLNA media'
|
||||
DLNA_MOBILE_APP_URL=
|
||||
|
||||
dlna_variables=(SYSTEM_TYPE
|
||||
USB_MOUNT_DLNA
|
||||
INSTALLED_WITHIN_DOCKER
|
||||
|
|
|
@ -40,6 +40,10 @@ DOKUWIKI_TITLE="${PROJECT_NAME} Dokuwiki"
|
|||
DOKUWIKI_REPO="https://github.com/splitbrain/dokuwiki"
|
||||
DOKUWIKI_COMMIT='be15c01c0b982cf1a75b5af031bf077143c63f39'
|
||||
|
||||
DOKUWIKI_SHORT_DESCRIPTION=$'Dokuwiki'
|
||||
DOKUWIKI_DESCRIPTION=$'Dokuwiki databaseless wiki'
|
||||
DOKUWIKI_MOBILE_APP_URL=
|
||||
|
||||
dokuwiki_variables=(ONION_ONLY
|
||||
MY_USERNAME
|
||||
DOKUWIKI_TITLE
|
||||
|
|
|
@ -38,6 +38,10 @@ EDITH_CODE=
|
|||
EDITH_ONION_PORT=8278
|
||||
EDITH_LOGIN_TEXT=$"Edith login"
|
||||
|
||||
EDITH_SHORT_DESCRIPTION=$'Edith Notes'
|
||||
EDITH_DESCRIPTION=$'Extremely simple note taking'
|
||||
EDITH_MOBILE_APP_URL=
|
||||
|
||||
edith_variables=(MY_USERNAME
|
||||
MY_EMAIL_ADDRESS
|
||||
ONION_ONLY
|
||||
|
|
|
@ -42,6 +42,10 @@ ETHERPAD_ADMIN_PASSWORD=
|
|||
ETHERPAD_TITLE=$'Freedombone Docs'
|
||||
ETHERPAD_WELCOME_MESSAGE=$"Welcome to ${ETHERPAD_TITLE}!\\n\\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!"
|
||||
|
||||
ETHERPAD_SHORT_DESCRIPTION=$'Etherpad'
|
||||
ETHERPAD_DESCRIPTION=$'Etherpad'
|
||||
ETHERPAD_MOBILE_APP_URL=
|
||||
|
||||
etherpad_variables=(ONION_ONLY
|
||||
DEFAULT_DOMAIN_NAME
|
||||
ETHERPAD_DOMAIN_NAME
|
||||
|
|
|
@ -42,6 +42,10 @@ FEDWIKI_PORT=3053
|
|||
FEDWIKI_DATA=/var/lib/fedwiki
|
||||
FEDWIKI_COOKIE=
|
||||
|
||||
FEDWIKI_SHORT_DESCRIPTION=$'FedWiki'
|
||||
FEDWIKI_DESCRIPTION=$'Federated Wiki'
|
||||
FEDWIKI_MOBILE_APP_URL=
|
||||
|
||||
fedwiki_variables=(FEDWIKI_DOMAIN_NAME
|
||||
FEDWIKI_CODE
|
||||
FEDWIKI_COOKIE
|
||||
|
|
|
@ -40,6 +40,10 @@ FRIENDICA_ADMIN_PASSWORD=
|
|||
FRIENDICA_COMMIT='b5a42c5b31fae5315bacd37769eba20ab2345aaa'
|
||||
FRIENDICA_ADDONS_COMMIT='7cb9dbdda7f227462895c07be3c968405561d40e'
|
||||
|
||||
FRIENDICA_SHORT_DESCRIPTION=$'Friendica'
|
||||
FRIENDICA_DESCRIPTION=$'Friendica federated social network'
|
||||
FRIENDICA_MOBILE_APP_URL=
|
||||
|
||||
friendica_variables=(ONION_ONLY
|
||||
FRIENDICA_DOMAIN_NAME
|
||||
FRIENDICA_CODE
|
||||
|
|
|
@ -46,6 +46,10 @@ GNUSOCIAL_TITLE='Pleroma FE'
|
|||
# Number of months after which posts expire
|
||||
GNUSOCIAL_EXPIRE_MONTHS=3
|
||||
|
||||
GNUSOCIAL_SHORT_DESCRIPTION=$'GNU Social'
|
||||
GNUSOCIAL_DESCRIPTION=$'GNU Social federated microblogging'
|
||||
GNUSOCIAL_MOBILE_APP_URL='https://f-droid.org/packages/org.mariotaku.twidere/'
|
||||
|
||||
gnusocial_variables=(ONION_ONLY
|
||||
GNUSOCIAL_DOMAIN_NAME
|
||||
GNUSOCIAL_CODE
|
||||
|
|
|
@ -34,18 +34,21 @@ SHOW_ON_ABOUT=1
|
|||
GOGS_USERNAME='gogs'
|
||||
GOGS_VERSION='0.11.29'
|
||||
|
||||
GIT_DOMAIN_NAME=
|
||||
GIT_CODE=
|
||||
GOGS_DOMAIN_NAME=
|
||||
GOGS_CODE=
|
||||
GIT_ONION_PORT=8090
|
||||
GIT_ADMIN_PASSWORD=
|
||||
GOGS_BIN=
|
||||
GOGS_PORT=3145
|
||||
|
||||
GOGS_SHORT_DESCRIPTION=$'Gogs'
|
||||
GOGS_DESCRIPTION=$'Gogs git repo management'
|
||||
GOGS_MOBILE_APP_URL=
|
||||
|
||||
gogs_variables=(ONION_ONLY
|
||||
GIT_ADMIN_PASSWORD
|
||||
GIT_DOMAIN_NAME
|
||||
GIT_CODE
|
||||
GIT_ONION_PORT
|
||||
GOGS_DOMAIN_NAME
|
||||
GOGS_CODE
|
||||
MY_USERNAME
|
||||
DDNS_PROVIDER
|
||||
ARCHITECTURE)
|
||||
|
@ -65,8 +68,8 @@ function change_password_gogs {
|
|||
|
||||
function install_interactive_gogs {
|
||||
if [[ $ONION_ONLY != "no" ]]; then
|
||||
GIT_DOMAIN_NAME='gogs.local'
|
||||
write_config_param "GIT_DOMAIN_NAME" "$GIT_DOMAIN_NAME"
|
||||
GOGS_DOMAIN_NAME='gogs.local'
|
||||
write_config_param "GOGS_DOMAIN_NAME" "$GOGS_DOMAIN_NAME"
|
||||
else
|
||||
function_check interactive_site_details
|
||||
interactive_site_details git
|
||||
|
@ -156,8 +159,8 @@ function upgrade_gogs {
|
|||
# Change port number if necessary
|
||||
if ! grep -q "HTTP_PORT = ${GOGS_PORT}" "${GOGS_CONFIG_FILE}"; then
|
||||
sed -i "s|HTTP_PORT =.*|HTTP_PORT = ${GOGS_PORT}|g" "${GOGS_CONFIG_FILE}"
|
||||
read_config_param GIT_DOMAIN_NAME
|
||||
sed -i "s|proxy_pass .*|proxy_pass http://localhost:${GOGS_PORT};|g" "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
read_config_param GOGS_DOMAIN_NAME
|
||||
sed -i "s|proxy_pass .*|proxy_pass http://localhost:${GOGS_PORT};|g" "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
systemctl restart gogs
|
||||
systemctl restart nginx
|
||||
fi
|
||||
|
@ -268,7 +271,7 @@ function restore_local_gogs {
|
|||
return
|
||||
fi
|
||||
|
||||
if [ ${#GIT_DOMAIN_NAME} -gt 2 ]; then
|
||||
if [ ${#GOGS_DOMAIN_NAME} -gt 2 ]; then
|
||||
function_check gogs_create_database
|
||||
gogs_create_database
|
||||
|
||||
|
@ -276,7 +279,7 @@ function restore_local_gogs {
|
|||
GOGS_CONFIG_FILE="${GOGS_CONFIG_PATH}/app.ini"
|
||||
|
||||
function_check restore_database
|
||||
restore_database gogs "${GIT_DOMAIN_NAME}"
|
||||
restore_database gogs "${GOGS_DOMAIN_NAME}"
|
||||
temp_restore_dir=/root/tempgogs
|
||||
if [ -d "${USB_MOUNT}/backup/gogs" ]; then
|
||||
echo $"Restoring Gogs settings"
|
||||
|
@ -350,7 +353,7 @@ function restore_local_gogs {
|
|||
function backup_remote_gogs {
|
||||
if [ -d /home/$GOGS_USERNAME ]; then
|
||||
function_check suspend_site
|
||||
suspend_site ${GIT_DOMAIN_NAME}
|
||||
suspend_site ${GOGS_DOMAIN_NAME}
|
||||
|
||||
function_check backup_database_to_friend
|
||||
backup_database_to_friend gogs
|
||||
|
@ -379,7 +382,7 @@ function backup_remote_gogs {
|
|||
|
||||
function restore_remote_gogs {
|
||||
if grep -q "gogs domain" "$COMPLETION_FILE"; then
|
||||
GIT_DOMAIN_NAME=$(get_completion_param "gogs domain")
|
||||
GOGS_DOMAIN_NAME=$(get_completion_param "gogs domain")
|
||||
|
||||
function_check gogs_create_database
|
||||
gogs_create_database
|
||||
|
@ -388,7 +391,7 @@ function restore_remote_gogs {
|
|||
GOGS_CONFIG_FILE=${GOGS_CONFIG_PATH}/app.ini
|
||||
|
||||
function_check restore_database_from_friend
|
||||
restore_database_from_friend gogs "${GIT_DOMAIN_NAME}"
|
||||
restore_database_from_friend gogs "${GOGS_DOMAIN_NAME}"
|
||||
if [ -d "${SERVER_DIRECTORY}/backup/gogs" ]; then
|
||||
if [ ! -d $GOGS_CONFIG_PATH ]; then
|
||||
mkdir -p $GOGS_CONFIG_PATH
|
||||
|
@ -445,19 +448,19 @@ function restore_remote_gogs {
|
|||
}
|
||||
|
||||
function remove_gogs {
|
||||
if [ ${#GIT_DOMAIN_NAME} -eq 0 ]; then
|
||||
if [ ${#GOGS_DOMAIN_NAME} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
systemctl stop gogs
|
||||
systemctl disable gogs
|
||||
|
||||
nginx_dissite "${GIT_DOMAIN_NAME}"
|
||||
remove_certs "${GIT_DOMAIN_NAME}"
|
||||
if [ -d "/var/www/${GIT_DOMAIN_NAME}" ]; then
|
||||
rm -rf "/var/www/${GIT_DOMAIN_NAME}"
|
||||
nginx_dissite "${GOGS_DOMAIN_NAME}"
|
||||
remove_certs "${GOGS_DOMAIN_NAME}"
|
||||
if [ -d "/var/www/${GOGS_DOMAIN_NAME}" ]; then
|
||||
rm -rf "/var/www/${GOGS_DOMAIN_NAME}"
|
||||
fi
|
||||
if [ -f "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}" ]; then
|
||||
rm "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
if [ -f "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}" ]; then
|
||||
rm "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
fi
|
||||
function_check drop_database
|
||||
drop_database gogs
|
||||
|
@ -473,11 +476,11 @@ function remove_gogs {
|
|||
userdel -r gogs
|
||||
|
||||
function_check remove_ddns_domain
|
||||
remove_ddns_domain "$GIT_DOMAIN_NAME"
|
||||
remove_ddns_domain "$GOGS_DOMAIN_NAME"
|
||||
}
|
||||
|
||||
function install_gogs {
|
||||
if [ ! "$GIT_DOMAIN_NAME" ]; then
|
||||
if [ ! "$GOGS_DOMAIN_NAME" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -580,33 +583,33 @@ function install_gogs {
|
|||
systemctl daemon-reload
|
||||
systemctl start gogs
|
||||
|
||||
if [ ! -d "/var/www/${GIT_DOMAIN_NAME}" ]; then
|
||||
mkdir "/var/www/${GIT_DOMAIN_NAME}"
|
||||
if [ ! -d "/var/www/${GOGS_DOMAIN_NAME}" ]; then
|
||||
mkdir "/var/www/${GOGS_DOMAIN_NAME}"
|
||||
fi
|
||||
if [ -d "/var/www/${GIT_DOMAIN_NAME}/htdocs" ]; then
|
||||
rm -rf "/var/www/${GIT_DOMAIN_NAME}/htdocs"
|
||||
if [ -d "/var/www/${GOGS_DOMAIN_NAME}/htdocs" ]; then
|
||||
rm -rf "/var/www/${GOGS_DOMAIN_NAME}/htdocs"
|
||||
fi
|
||||
|
||||
if [[ "${ONION_ONLY}" == "no" ]]; then
|
||||
function_check nginx_http_redirect
|
||||
nginx_http_redirect "${GIT_DOMAIN_NAME}"
|
||||
nginx_http_redirect "${GOGS_DOMAIN_NAME}"
|
||||
{ echo 'server {';
|
||||
echo ' listen 443 ssl;';
|
||||
echo ' #listen [::]:443 ssl;';
|
||||
echo " root /var/www/${GIT_DOMAIN_NAME}/htdocs;";
|
||||
echo " server_name ${GIT_DOMAIN_NAME};";
|
||||
echo " root /var/www/${GOGS_DOMAIN_NAME}/htdocs;";
|
||||
echo " server_name ${GOGS_DOMAIN_NAME};";
|
||||
echo ' access_log /dev/null;';
|
||||
echo " error_log /dev/null;";
|
||||
echo ''; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo ''; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
function_check nginx_ssl
|
||||
nginx_ssl "${GIT_DOMAIN_NAME}"
|
||||
nginx_ssl "${GOGS_DOMAIN_NAME}"
|
||||
function_check nginx_security_options
|
||||
nginx_security_options "${GIT_DOMAIN_NAME}"
|
||||
nginx_security_options "${GOGS_DOMAIN_NAME}"
|
||||
{ echo ' add_header Strict-Transport-Security max-age=0;';
|
||||
echo '';
|
||||
echo ' location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo ' location / {'; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
function_check nginx_limits
|
||||
nginx_limits "${GIT_DOMAIN_NAME}" '10G'
|
||||
nginx_limits "${GOGS_DOMAIN_NAME}" '10G'
|
||||
{ echo " proxy_pass http://localhost:${GOGS_PORT};";
|
||||
echo ' }';
|
||||
echo '';
|
||||
|
@ -621,24 +624,24 @@ function install_gogs {
|
|||
echo ' access_log /dev/null;';
|
||||
echo ' }';
|
||||
echo '}';
|
||||
echo ''; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo ''; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
else
|
||||
echo -n '' > "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo -n '' > "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
fi
|
||||
{ echo 'server {';
|
||||
echo " listen 127.0.0.1:${GIT_ONION_PORT} default_server;";
|
||||
echo " root /var/www/$GIT_DOMAIN_NAME/htdocs;";
|
||||
echo " server_name $GIT_DOMAIN_NAME;";
|
||||
echo " root /var/www/$GOGS_DOMAIN_NAME/htdocs;";
|
||||
echo " server_name $GOGS_DOMAIN_NAME;";
|
||||
echo ' access_log /dev/null;';
|
||||
echo " error_log /dev/null;";
|
||||
echo ''; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo ''; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
function_check nginx_security_options
|
||||
nginx_security_options "${GIT_DOMAIN_NAME}"
|
||||
nginx_security_options "${GOGS_DOMAIN_NAME}"
|
||||
{ echo ' add_header Strict-Transport-Security max-age=0;';
|
||||
echo '';
|
||||
echo ' location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo ' location / {'; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
function_check nginx_limits
|
||||
nginx_limits "${GIT_DOMAIN_NAME}" '10G'
|
||||
nginx_limits "${GOGS_DOMAIN_NAME}" '10G'
|
||||
{ echo " proxy_pass http://localhost:${GOGS_PORT};";
|
||||
echo ' }';
|
||||
echo '';
|
||||
|
@ -652,15 +655,15 @@ function install_gogs {
|
|||
echo ' log_not_found off;';
|
||||
echo ' access_log /dev/null;';
|
||||
echo ' }';
|
||||
echo '}'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
|
||||
echo '}'; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
|
||||
|
||||
function_check configure_php
|
||||
configure_php
|
||||
|
||||
function_check create_site_certificate
|
||||
create_site_certificate "${GIT_DOMAIN_NAME}" 'yes'
|
||||
create_site_certificate "${GOGS_DOMAIN_NAME}" 'yes'
|
||||
|
||||
nginx_ensite "${GIT_DOMAIN_NAME}"
|
||||
nginx_ensite "${GOGS_DOMAIN_NAME}"
|
||||
|
||||
if [ ! -d /var/lib/tor ]; then
|
||||
echo $'No Tor installation found. Gogs onion site cannot be configured.'
|
||||
|
@ -685,11 +688,11 @@ function install_gogs {
|
|||
systemctl restart php7.0-fpm
|
||||
systemctl restart nginx
|
||||
|
||||
set_completion_param "gogs domain" "$GIT_DOMAIN_NAME"
|
||||
set_completion_param "gogs domain" "$GOGS_DOMAIN_NAME"
|
||||
set_completion_param "gogs onion domain" "$GIT_ONION_HOSTNAME"
|
||||
|
||||
function_check add_ddns_domain
|
||||
add_ddns_domain "${GIT_DOMAIN_NAME}"
|
||||
add_ddns_domain "${GOGS_DOMAIN_NAME}"
|
||||
|
||||
# obtain the secret key
|
||||
GOGS_SECRET_KEY="$(create_password "${MINIMUM_PASSWORD_LENGTH}")"
|
||||
|
@ -718,17 +721,17 @@ function install_gogs {
|
|||
echo '';
|
||||
echo '[server]'; } >> ${GOGS_CONFIG_FILE}
|
||||
if [[ ${ONION_ONLY} == 'no' ]]; then
|
||||
echo "DOMAIN = ${GIT_DOMAIN_NAME}" >> ${GOGS_CONFIG_FILE}
|
||||
echo "ROOT_URL = https://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
|
||||
echo "DOMAIN = ${GOGS_DOMAIN_NAME}" >> ${GOGS_CONFIG_FILE}
|
||||
echo "ROOT_URL = https://$GOGS_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
|
||||
else
|
||||
echo "DOMAIN = ${GIT_ONION_HOSTNAME}" >> ${GOGS_CONFIG_FILE}
|
||||
echo "ROOT_URL = http://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
|
||||
echo "ROOT_URL = http://$GOGS_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
|
||||
fi
|
||||
{ echo "HTTP_PORT = ${GOGS_PORT}";
|
||||
echo "SSH_PORT = $SSH_PORT";
|
||||
echo 'SSH_DOMAIN = %(DOMAIN)s';
|
||||
echo "CERT_FILE = /etc/ssl/certs/${GIT_DOMAIN_NAME}.pem";
|
||||
echo "KEY_FILE = /etc/ssl/private/${GIT_DOMAIN_NAME}.key";
|
||||
echo "CERT_FILE = /etc/ssl/certs/${GOGS_DOMAIN_NAME}.pem";
|
||||
echo "KEY_FILE = /etc/ssl/private/${GOGS_DOMAIN_NAME}.key";
|
||||
echo 'DISABLE_ROUTER_LOG = true';
|
||||
echo '';
|
||||
echo '[session]';
|
||||
|
@ -758,9 +761,9 @@ function install_gogs {
|
|||
systemctl restart gogs
|
||||
|
||||
if ! grep -q "gogs domain:" "${COMPLETION_FILE}"; then
|
||||
echo "gogs domain:${GIT_DOMAIN_NAME}" >> "${COMPLETION_FILE}"
|
||||
echo "gogs domain:${GOGS_DOMAIN_NAME}" >> "${COMPLETION_FILE}"
|
||||
else
|
||||
sed -i "s|gogs domain.*|gogs domain:${GIT_DOMAIN_NAME}|g" "${COMPLETION_FILE}"
|
||||
sed -i "s|gogs domain.*|gogs domain:${GOGS_DOMAIN_NAME}|g" "${COMPLETION_FILE}"
|
||||
fi
|
||||
|
||||
function_check configure_firewall_for_git
|
||||
|
|
|
@ -39,6 +39,10 @@ HTMLY_COMMIT='bf5fe9486160be4da86d8987d3e5c977e1dc6d32'
|
|||
HTMLY_TITLE="My Blog"
|
||||
HTMLY_SUBTITLE="Another ${PROJECT_NAME} blog"
|
||||
|
||||
HTMLY_SHORT_DESCRIPTION=$'HTMLy'
|
||||
HTMLY_DESCRIPTION=$'HTMLy databaseless blogging'
|
||||
HTMLY_MOBILE_APP_URL=
|
||||
|
||||
htmly_variables=(HTMLY_REPO
|
||||
HTMLY_DOMAIN_NAME
|
||||
HTMLY_CODE
|
||||
|
|
|
@ -41,6 +41,10 @@ HUBZILLA_ADDONS_REPO="https://github.com/redmatrix/hubzilla-addons.git"
|
|||
HUBZILLA_ADDONS_COMMIT='be9dcd044b9326c3bd9301d7c4b375a2c2f54663'
|
||||
HUBZILLA_ADMIN_PASSWORD=
|
||||
|
||||
HUBZILLA_SHORT_DESCRIPTION=$'Hubzilla'
|
||||
HUBZILLA_DESCRIPTION=$'Hubzilla'
|
||||
HUBZILLA_MOBILE_APP_URL=
|
||||
|
||||
hubzilla_variables=(ONION_ONLY
|
||||
HUBZILLA_DOMAIN_NAME
|
||||
HUBZILLA_CODE
|
||||
|
|
|
@ -44,6 +44,10 @@ ICECAST_DIR=/icestream
|
|||
ICECAST_PLAYLIST_FILE=/etc/ices2/playlist.txt
|
||||
ICECAST_LOGIN_TEXT=$"Icecast login"
|
||||
|
||||
ICECAST_SHORT_DESCRIPTION=$'Icecast'
|
||||
ICECAST_DESCRIPTION=$'Icecast'
|
||||
ICECAST_MOBILE_APP_URL=
|
||||
|
||||
icecast_variables=(MY_USERNAME
|
||||
MY_EMAIL_ADDRESS
|
||||
ONION_ONLY
|
||||
|
|
|
@ -41,6 +41,10 @@ IRC_PASSWORD=
|
|||
# Number of entries for the bouncer to buffer
|
||||
IRC_BUFFER_LENGTH=300
|
||||
|
||||
IRC_SHORT_DESCRIPTION=$'IRC'
|
||||
IRC_DESCRIPTION=$'IRC'
|
||||
IRC_MOBILE_APP_URL='https://f-droid.org/packages/org.yaaic'
|
||||
|
||||
irc_variables=(MY_USERNAME
|
||||
MY_NAME
|
||||
IRC_PORT
|
||||
|
|
|
@ -44,6 +44,10 @@ JITSI_DOMAIN_NAME=
|
|||
JITSI_CODE=
|
||||
JITSI_ONION_HOSTNAME=
|
||||
|
||||
JITSI_SHORT_DESCRIPTION=$'Jitsi'
|
||||
JITSI_DESCRIPTION=$'Jitsi'
|
||||
JITSI_MOBILE_APP_URL=
|
||||
|
||||
jitsi_variables=(ONION_ONLY
|
||||
JITSI_DOMAIN_NAME
|
||||
JITSI_ONION_HOSTNAME
|
||||
|
|
|
@ -38,6 +38,9 @@ KANBOARD_REPO="https://github.com/kanboard/kanboard"
|
|||
KANBOARD_COMMIT='7a6b1bc3da0af442e02b5a2dc430a4ded8e7c4ee'
|
||||
KANBOARD_ADMIN_PASSWORD=
|
||||
|
||||
KANBOARD_SHORT_DESCRIPTION=$'Kanboard'
|
||||
KANBOARD_DESCRIPTION=$'Kanboard kanban'
|
||||
KANBOARD_MOBILE_APP_URL=
|
||||
|
||||
kanboard_variables=(ONION_ONLY
|
||||
KANBOARD_DOMAIN_NAME
|
||||
|
|
|
@ -40,6 +40,10 @@ KOEL_REPO="https://github.com/phanan/koel"
|
|||
KOEL_COMMIT='8e9b021aa09f2b1460977bdd52fff14ea2bc1607'
|
||||
KOEL_ADMIN_PASSWORD=
|
||||
|
||||
KOEL_SHORT_DESCRIPTION=$'Koel music'
|
||||
KOEL_DESCRIPTION=$'Koel music player'
|
||||
KOEL_MOBILE_APP_URL=
|
||||
|
||||
koel_variables=(ONION_ONLY
|
||||
KOEL_DOMAIN_NAME
|
||||
KOEL_CODE
|
||||
|
|
|
@ -37,6 +37,10 @@ LYCHEE_ONION_PORT=8105
|
|||
LYCHEE_REPO="https://github.com/electerious/Lychee"
|
||||
LYCHEE_COMMIT='27f207dcbac8488629ffc3b5a9cac78ae123bee9'
|
||||
|
||||
LYCHEE_SHORT_DESCRIPTION=$'Lychee photos'
|
||||
LYCHEE_DESCRIPTION=$'Lychee photos'
|
||||
LYCHEE_MOBILE_APP_URL=
|
||||
|
||||
lychee_variables=(LYCHEE_REPO
|
||||
LYCHEE_DOMAIN_NAME
|
||||
LYCHEE_CODE
|
||||
|
|
|
@ -38,6 +38,10 @@ MAILPILE_REPO="https://github.com/mailpile/Mailpile"
|
|||
MAILPILE_COMMIT='4f28f1bb55b3b9985f22ab6372d539b1087482dd'
|
||||
MAILPILE_PORT=33411
|
||||
|
||||
MAILPILE_SHORT_DESCRIPTION=$'Mailpile'
|
||||
MAILPILE_DESCRIPTION=$'Mailpile email client'
|
||||
MAILPILE_MOBILE_APP_URL=
|
||||
|
||||
mailpile_variables=(MAILPILE_REPO
|
||||
MAILPILE_DOMAIN_NAME
|
||||
MAILPILE_CODE
|
||||
|
|
|
@ -53,6 +53,10 @@ REPORT_STATS="no"
|
|||
MATRIX_SECRET=
|
||||
MATRIX_EXPIRE_MONTHS=1
|
||||
|
||||
MATRIX_SHORT_DESCRIPTION=$'Matrix chat'
|
||||
MATRIX_DESCRIPTION=$'Matrix chat'
|
||||
MATRIX_MOBILE_APP_URL='https://f-droid.org/packages/im.vector.alpha'
|
||||
|
||||
matrix_variables=(ONION_ONLY
|
||||
MY_USERNAME
|
||||
MATRIX_SECRET
|
||||
|
|
|
@ -35,11 +35,15 @@ MEDIAGOBLIN_DOMAIN_NAME=
|
|||
MEDIAGOBLIN_ADMIN_PASSWORD=
|
||||
MEDIAGOBLIN_CODE=
|
||||
MEDIAGOBLIN_ONION_PORT=8108
|
||||
MEDIAGOBLIN_REPO="http://git.savannah.gnu.org/r/mediagoblin.git"
|
||||
MEDIAGOBLIN_REPO="https://git.savannah.gnu.org/git/mediagoblin.git"
|
||||
MEDIAGOBLIN_COMMIT='c4d3293dfa4076719e60fe9e052add07426f9a9a'
|
||||
MEDIAGOBLIN_BASE_DIR=/var/www/mediagoblin.local/htdocs
|
||||
MEDIAGOBLIN_PORT=6543
|
||||
|
||||
MEDIAGOBLIN_SHORT_DESCRIPTION=$'Mediagoblin'
|
||||
MEDIAGOBLIN_DESCRIPTION=$'Mediagoblin'
|
||||
MEDIAGOBLIN_MOBILE_APP_URL=
|
||||
|
||||
mediagoblin_variables=(ONION_ONLY
|
||||
MY_USERNAME
|
||||
MEDIAGOBLIN_DOMAIN_NAME
|
||||
|
|
|
@ -39,6 +39,10 @@ MOVIM_COMMIT='6142c2033b7695448516a67690324a3bde048260'
|
|||
MOVIM_ADMIN_PASSWORD=
|
||||
MOVIM_DAEMON_PORT=8880
|
||||
|
||||
MOVIM_SHORT_DESCRIPTION=$'Movim'
|
||||
MOVIM_DESCRIPTION=$'Movim'
|
||||
MOVIM_MOBILE_APP_URL='https://f-droid.org/packages/com.movim.movim'
|
||||
|
||||
movim_variables=(ONION_ONLY
|
||||
MOVIM_DOMAIN_NAME
|
||||
MOVIM_CODE
|
||||
|
|
|
@ -40,6 +40,10 @@ MUMBLE_PORT=64738
|
|||
MUMBLE_DATABASE="mumble-server.sqlite"
|
||||
MUMBLE_CONFIG_FILE="mumble-server.ini"
|
||||
|
||||
MUMBLE_SHORT_DESCRIPTION=$'Mumble'
|
||||
MUMBLE_DESCRIPTION=$'Mumble'
|
||||
MUMBLE_MOBILE_APP_URL='https://f-droid.org/packages/com.morlunk.mumbleclient'
|
||||
|
||||
mumble_variables=(MY_USERNAME
|
||||
DEFAULT_DOMAIN_NAME
|
||||
MUMBLE_PORT
|
||||
|
|
|
@ -42,6 +42,10 @@ NEXTCLOUD_COMMIT='edd5712c6ead5b09fa4f996cfda66fc4e18ba597'
|
|||
NEXTCLOUD_ADMIN_PASSWORD=
|
||||
NEXTCLOUD_SERVER_SIDE_ENCRYPTION=1
|
||||
|
||||
NEXTCLOUD_SHORT_DESCRIPTION=$'NextCloud'
|
||||
NEXTCLOUD_DESCRIPTION=$'NextCloud'
|
||||
NEXTCLOUD_MOBILE_APP_URL='https://f-droid.org/packages/com.nextcloud.client'
|
||||
|
||||
nextcloud_variables=(ONION_ONLY
|
||||
NEXTCLOUD_DOMAIN_NAME
|
||||
NEXTCLOUD_CODE
|
||||
|
|
|
@ -44,6 +44,10 @@ PEERTUBE_PORT=9004
|
|||
MESH_PEERTUBE_PORT=8500
|
||||
PEERTUBE_DIR=/etc/peertube
|
||||
|
||||
PEERTUBE_SHORT_DESCRIPTION=$'PeerTube'
|
||||
PEERTUBE_DESCRIPTION=$'PeerTube'
|
||||
PEERTUBE_MOBILE_APP_URL=
|
||||
|
||||
peertube_variables=(PEERTUBE_DOMAIN_NAME
|
||||
PEERTUBE_CODE
|
||||
PEERTUBE_ADMIN_PASSWORD
|
||||
|
|
|
@ -51,6 +51,10 @@ PLEROMA_EXPIRE_MONTHS=3
|
|||
pleroma_expire_posts_script=/usr/bin/pleroma-expire-posts
|
||||
blocking_script_file=/usr/bin/pleroma-blocking
|
||||
|
||||
PLEROMA_SHORT_DESCRIPTION=$'Pleroma'
|
||||
PLEROMA_DESCRIPTION=$'Pleroma federated microblogging'
|
||||
PLEROMA_MOBILE_APP_URL='https://f-droid.org/packages/com.keylesspalace.tusky'
|
||||
|
||||
pleroma_variables=(ONION_ONLY
|
||||
PLEROMA_DOMAIN_NAME
|
||||
PLEROMA_CODE
|
||||
|
|
|
@ -45,6 +45,10 @@ POSTACTIV_TITLE='PostActiv'
|
|||
# Number of months after which posts expire
|
||||
POSTACTIV_EXPIRE_MONTHS=3
|
||||
|
||||
POSTACTIV_SHORT_DESCRIPTION=$'PostActiv'
|
||||
POSTACTIV_DESCRIPTION=$'PostActiv federated microblogging'
|
||||
POSTACTIV_MOBILE_APP_URL='https://f-droid.org/packages/org.mariotaku.twidere/'
|
||||
|
||||
postactiv_variables=(ONION_ONLY
|
||||
POSTACTIV_DOMAIN_NAME
|
||||
POSTACTIV_CODE
|
||||
|
|
|
@ -38,6 +38,10 @@ PRIVATEBIN_REPO="https://github.com/PrivateBin/PrivateBin"
|
|||
PRIVATEBIN_COMMIT='9c132cd839fd5e91da18e4a1e8ebef64fce605fb'
|
||||
PRIVATEBIN_ADMIN_PASSWORD=
|
||||
|
||||
PRIVATEBIN_SHORT_DESCRIPTION=$'PrivateBin'
|
||||
PRIVATEBIN_DESCRIPTION=$'PrivateBin zero knowledge pastebin'
|
||||
PRIVATEBIN_MOBILE_APP_URL=
|
||||
|
||||
privatebin_variables=(ONION_ONLY
|
||||
PRIVATEBIN_DOMAIN_NAME
|
||||
PRIVATEBIN_CODE
|
||||
|
|
|
@ -36,6 +36,10 @@ ROCKETCHAT_CODE=
|
|||
ROCKETCHAT_ONION_PORT=9722
|
||||
ROCKETCHAT_PORT_INTERNAL=3000
|
||||
|
||||
ROCKETCHAT_SHORT_DESCRIPTION=$'Rocketchat'
|
||||
ROCKETCHAT_DESCRIPTION=$'Rocketchat'
|
||||
ROCKETCHAT_MOBILE_APP_URL=
|
||||
|
||||
rocketchat_variables=(ONION_ONLY
|
||||
ROCKETCHAT_DOMAIN_NAME
|
||||
ROCKETCHAT_CODE
|
||||
|
|
|
@ -40,6 +40,10 @@ SYNCTHING_PORT=22000
|
|||
SYNCTHING_SHARED_DATA=/var/lib/syncthing/SyncShared
|
||||
SYNCTHING_USER_IDS_FILE='.syncthingids'
|
||||
|
||||
SYNCTHING_SHORT_DESCRIPTION=$'Syncthing'
|
||||
SYNCTHING_DESCRIPTION=$'Syncthing file synchronization'
|
||||
SYNCTHING_MOBILE_APP_URL='https://f-droid.org/packages/com.nutomic.syncthingandroid'
|
||||
|
||||
syncthing_variables=(SYNCTHING_ID
|
||||
SYNCTHING_CONFIG_PATH
|
||||
SYNCTHING_CONFIG_FILE
|
||||
|
|
|
@ -48,6 +48,10 @@ TURTL_BASE_DIR=/etc/turtl
|
|||
TURTL_SIGNUP_STRING='Signup a new user'
|
||||
turtl_users_file=$TURTL_BASE_DIR/api/controllers/users.lisp
|
||||
|
||||
TURTL_SHORT_DESCRIPTION=$'Turtl'
|
||||
TURTL_DESCRIPTION=$'Turtl notes'
|
||||
TURTL_MOBILE_APP_URL=
|
||||
|
||||
turtl_variables=(ONION_ONLY
|
||||
DEFAULT_DOMAIN_NAME
|
||||
TURTL_DOMAIN_NAME
|
||||
|
|
|
@ -53,6 +53,10 @@ prosody_modules_filename='prosody-modules-20180322.tar.gz'
|
|||
prosody_modules_hash='982d0dfcef98e9cb9cee4cc3801b8ce9a503a32e44c32b99df6fe94545b90072'
|
||||
xmpp_encryption_warning=$"For security reasons, OMEMO or PGP encryption is required for conversations on this server."
|
||||
|
||||
XMPP_SHORT_DESCRIPTION=$'XMPP chat'
|
||||
XMPP_DESCRIPTION=$'XMPP chat'
|
||||
XMPP_MOBILE_APP_URL='https://f-droid.org/packages/eu.siacs.conversations'
|
||||
|
||||
xmpp_variables=(ONION_ONLY
|
||||
INSTALLED_WITHIN_DOCKER
|
||||
XMPP_CIPHERS
|
||||
|
|
|
@ -74,8 +74,8 @@ GNUSOCIAL_DOMAIN_NAME=
|
|||
GNUSOCIAL_CODE=
|
||||
GNUSOCIAL_WELCOME_MESSAGE=$"<h1>Welcome to \$GNUSOCIAL_DOMAIN_NAME a federated social network</h1><p>Another $PROJECT_NAME site</p>"
|
||||
GNUSOCIAL_BACKGROUND_IMAGE_URL=
|
||||
GIT_DOMAIN_NAME=
|
||||
GIT_CODE=
|
||||
GOGS_DOMAIN_NAME=
|
||||
GOGS_CODE=
|
||||
USB_DRIVE=/dev/sdb1
|
||||
HWRNG_TYPE=
|
||||
ENABLE_SOCIAL_KEY_MANAGEMENT=
|
||||
|
|
|
@ -55,6 +55,10 @@ SYNCTHING_UPDATE_FILE='.syncthing-update'
|
|||
CHANGED=
|
||||
TEMP_IDS_FILE=/root/.synthingids
|
||||
|
||||
SYNCTHING_SHORT_DESCRIPTION=$'File Synchronization'
|
||||
SYNCTHING_DESCRIPTION=$'File Synchronization'
|
||||
SYNCTHING_MOBILE_APP_URL='https://f-droid.org/packages/com.nutomic.syncthingandroid'
|
||||
|
||||
function remove_user_syncthing {
|
||||
remove_username="$1"
|
||||
|
||||
|
|
|
@ -280,6 +280,11 @@ if [ $app_daemon ]; then
|
|||
fi
|
||||
fi
|
||||
echo ''
|
||||
echo $'# These parameters are used by the FreedomBox mobile app'
|
||||
echo "${app_name_upper}_SHORT_DESCRIPTION="
|
||||
echo "${app_name_upper}_DESCRIPTION="
|
||||
echo "${app_name_upper}_MOBILE_APP_URL="
|
||||
echo ''
|
||||
echo "${app_name}_variables=(ONION_ONLY"
|
||||
echo " ${app_name_upper}_DOMAIN_NAME"
|
||||
echo " ${app_name_upper}_CODE"
|
||||
|
|
|
@ -111,6 +111,7 @@ if [ -d "$PROJECT_DIR" ]; then
|
|||
rm /etc/exim4/exim4.conf.template.bak*
|
||||
email_update_onion_domain
|
||||
prevent_mail_process_overrun
|
||||
android_update_apps yes
|
||||
#defrag_filesystem
|
||||
|
||||
# reinstall tor from backports
|
||||
|
@ -125,6 +126,13 @@ fi
|
|||
# If logging was left on then turn it off
|
||||
${PROJECT_NAME}-logging off
|
||||
|
||||
# This is a hack to fix nginx failures which happen sometimes
|
||||
# when matrix is installed
|
||||
if [ -d /etc/matrix ]; then
|
||||
systemctl restart matrix
|
||||
systemctl restart nginx
|
||||
fi
|
||||
|
||||
# upgrading file prevents USB canary from activating
|
||||
if [ -f /tmp/.upgrading ]; then
|
||||
rm /tmp/.upgrading
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
#!/bin/bash
|
||||
# _____ _ _
|
||||
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
|
||||
# | __| _| -_| -_| . | . | | . | . | | -_|
|
||||
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
|
||||
#
|
||||
# Freedom in the Cloud
|
||||
#
|
||||
# Integration with the FreedomBox android app
|
||||
#
|
||||
# License
|
||||
# =======
|
||||
#
|
||||
# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
function android_update_apps {
|
||||
if [ "$1" ]; then
|
||||
detect_installable_apps
|
||||
fi
|
||||
|
||||
local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
|
||||
plinth_api="/var/www/${local_hostname}/htdocs/plinth/api.json"
|
||||
|
||||
# Create a self-signed cert if needed
|
||||
# The FreedomBox app assumes a self-signed cert
|
||||
if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
|
||||
install_web_local_user_interface
|
||||
systemctl restart nginx
|
||||
fi
|
||||
|
||||
if [ ! -d "/var/www/${local_hostname}/htdocs/plinth" ]; then
|
||||
mkdir -p "/var/www/${local_hostname}/htdocs/plinth"
|
||||
fi
|
||||
if [ ! -d "/var/www/${local_hostname}/htdocs/icons" ]; then
|
||||
mkdir -p "/var/www/${local_hostname}/htdocs/icons"
|
||||
fi
|
||||
|
||||
echo '{' > "$plinth_api"
|
||||
echo ' "shortcuts": [' >> "$plinth_api"
|
||||
|
||||
android_ctr=0
|
||||
app_index=0
|
||||
# shellcheck disable=SC2068,SC2034
|
||||
for a in ${APPS_INSTALLED[@]}
|
||||
do
|
||||
app_name=${APPS_INSTALLED_NAMES[$app_index]}
|
||||
if [ "$app_name" ]; then
|
||||
app_filename="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"
|
||||
if [ -f "$app_filename" ]; then
|
||||
# get the icon for the app
|
||||
icon_filename="/usr/share/${PROJECT_NAME}/android-app/${app_name}.png"
|
||||
if [ -f "$icon_filename" ]; then
|
||||
cp "$icon_filename" "/var/www/${local_hostname}/htdocs/icons/${app_name}.png"
|
||||
else
|
||||
icon_filename=
|
||||
fi
|
||||
|
||||
app_name_upper=$(echo "$app_name" | awk '{print toupper($0)}')
|
||||
SHORT_DESCRIPTION=
|
||||
DESCRIPTION=
|
||||
MOBILE_APP_URL=
|
||||
|
||||
if ! grep -q "${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename"; then
|
||||
app_index=$((app_index+1))
|
||||
continue
|
||||
fi
|
||||
if grep -q "#${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename"; then
|
||||
app_index=$((app_index+1))
|
||||
continue
|
||||
fi
|
||||
SHORT_DESCRIPTION="$(grep "${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename" | head -n 1 | sed 's|\$||g' | sed "s|'||g" | sed 's|\"||g' | awk -F '=' '{print $2}')"
|
||||
|
||||
if grep -q "${app_name_upper}_DESCRIPTION=" "$app_filename"; then
|
||||
DESCRIPTION="$(grep "${app_name_upper}_DESCRIPTION=" "$app_filename" | head -n 1 | sed 's|\$||g' | sed "s|'||g" | sed 's|\"||g' | awk -F '=' '{print $2}')"
|
||||
fi
|
||||
if grep -q "${app_name_upper}_MOBILE_APP_URL=" "$app_filename"; then
|
||||
MOBILE_APP_URL="$(grep "${app_name_upper}_MOBILE_APP_URL=" "$app_filename" | head -n 1 | sed 's|\$||g' | sed 's|\$||g' | sed "s|'||g" | sed 's|\"||g' | awk -F '=' '{print $2}')"
|
||||
fi
|
||||
|
||||
if [ $android_ctr -gt 0 ]; then
|
||||
echo ',' >> "$plinth_api"
|
||||
fi
|
||||
|
||||
{ echo ' {';
|
||||
echo " \"name\": \"${app_name}\",";
|
||||
echo " \"short_description\": \"$SHORT_DESCRIPTION\",";
|
||||
echo " \"description\": [";
|
||||
echo " \"$DESCRIPTION\"";
|
||||
echo ' ],';
|
||||
echo " \"icon_url\": \"/icons/${app_name}.png\",";
|
||||
echo " \"clients\": ["; } >> "$plinth_api"
|
||||
|
||||
read_config_param "${app_name_upper}_DOMAIN_NAME"
|
||||
test_domain_name="${app_name_upper}_DOMAIN_NAME"
|
||||
domain_name=${!test_domain_name}
|
||||
if [ "$domain_name" ]; then
|
||||
if [[ "$domain_name" != *'.onion' ]]; then
|
||||
domain_name="https://${!test_domain_name}"
|
||||
else
|
||||
domain_name="http://${!test_domain_name}"
|
||||
fi
|
||||
fi
|
||||
if [[ "$domain_name" && "$app_name" != 'matrix' ]]; then
|
||||
{ echo ' {';
|
||||
echo " \"name\": \"${app_name}\",";
|
||||
echo " \"platforms\": [";
|
||||
echo ' {';
|
||||
echo ' "type": "web",';
|
||||
echo " \"url\": \"$domain_name\"";
|
||||
echo -n ' }'; } >> "$plinth_api"
|
||||
fi
|
||||
|
||||
if [ "$MOBILE_APP_URL" ]; then
|
||||
if [[ "$domain_name" && "$app_name" != 'matrix' ]]; then
|
||||
echo ',' >> "$plinth_api"
|
||||
else
|
||||
{ echo ' {';
|
||||
echo " \"name\": \"${app_name}\",";
|
||||
echo " \"platforms\": ["; } >> "$plinth_api"
|
||||
fi
|
||||
store_name='f-droid'
|
||||
if [[ "$MOBILE_APP_URL" == *'google'* ]]; then
|
||||
store_name='google-play'
|
||||
fi
|
||||
{ echo ' {';
|
||||
echo ' "type": "store",';
|
||||
echo ' "os": "android",';
|
||||
echo " \"store_name\": \"$store_name\",";
|
||||
echo " \"url\": \"$MOBILE_APP_URL\"";
|
||||
echo ' }'; } >> "$plinth_api"
|
||||
else
|
||||
echo '' >> "$plinth_api"
|
||||
fi
|
||||
|
||||
{ echo ' ]';
|
||||
echo ' }';
|
||||
echo ' ]';
|
||||
echo -n ' }'; } >> "$plinth_api"
|
||||
|
||||
android_ctr=$((android_ctr+1))
|
||||
fi
|
||||
fi
|
||||
app_index=$((app_index+1))
|
||||
done
|
||||
|
||||
{ echo '';
|
||||
echo ' ]';
|
||||
echo '}'; } >> "$plinth_api"
|
||||
|
||||
chown -R www-data:www-data "/var/www/${local_hostname}/htdocs/plinth"
|
||||
chown -R www-data:www-data "/var/www/${local_hostname}/htdocs/icons"
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
|
@ -111,7 +111,7 @@ function mesh_avahi {
|
|||
WATCHDOG_SCRIPT_NAME="keepon"
|
||||
{ echo '';
|
||||
echo '# keep avahi daemon running';
|
||||
echo "AVAHI_RUNNING=\$(pgrep avahi-daemon > /dev/null && echo Running)";
|
||||
echo "AVAHI_RUNNING=\$(systemctl is-active avahi-daemon >/dev/null 2>&1 && echo Running)";
|
||||
echo "if [ ! \$AVAHI_RUNNING ]; then";
|
||||
echo ' systemctl start avahi-daemon';
|
||||
echo " echo -n \$CURRENT_DATE >> \$LOGFILE";
|
||||
|
@ -120,6 +120,33 @@ function mesh_avahi {
|
|||
chmod +x "$rootdir/usr/bin/$WATCHDOG_SCRIPT_NAME"
|
||||
}
|
||||
|
||||
function keep_avahi_running {
|
||||
WATCHDOG_SCRIPT_NAME="keepon"
|
||||
|
||||
if grep -q "avahi daemon" "/usr/bin/$WATCHDOG_SCRIPT_NAME"; then
|
||||
return
|
||||
fi
|
||||
|
||||
{ echo '';
|
||||
echo '# keep avahi daemon running';
|
||||
echo "AVAHI_RUNNING=\$(systemctl is-active avahi-daemon >/dev/null 2>&1 && echo Running)";
|
||||
echo "if [ ! \$AVAHI_RUNNING ]; then";
|
||||
echo ' systemctl start avahi-daemon';
|
||||
echo " echo -n \$CURRENT_DATE >> \$LOGFILE";
|
||||
echo " echo \" Avahi daemon restarted\" >> \$LOGFILE";
|
||||
echo 'fi';
|
||||
echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
|
||||
chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
|
||||
|
||||
# This is a bit of a hack to ensure that avahi services get broadcast
|
||||
# Without this some other systems may not be able to see the server
|
||||
{ echo '#!/bin/bash';
|
||||
echo 'systemctl restart avahi-daemon'; } > /usr/bin/restartavahi
|
||||
chmod +x /usr/bin/restartavahi
|
||||
|
||||
cron_add_mins 10 /usr/bin/restartavahi
|
||||
}
|
||||
|
||||
function install_avahi {
|
||||
if [ "$INSTALLING_MESH" ]; then
|
||||
mesh_avahi
|
||||
|
|
|
@ -211,7 +211,7 @@ function set_default_onion_domains {
|
|||
BLUDIT_DOMAIN_NAME='bludit.local'
|
||||
DOKUWIKI_DOMAIN_NAME='dokuwiki.local'
|
||||
DEFAULT_DOMAIN_NAME="${LOCAL_NAME}.local"
|
||||
GIT_DOMAIN_NAME='gogs.local'
|
||||
GOGS_DOMAIN_NAME='gogs.local'
|
||||
}
|
||||
|
||||
function create_avahi_onion_domains {
|
||||
|
@ -229,7 +229,7 @@ function create_avahi_onion_domains {
|
|||
function_check create_avahi_service
|
||||
create_avahi_service blog http tcp "$HTMLY_ONION_PORT"
|
||||
fi
|
||||
if [ $GIT_DOMAIN_NAME ]; then
|
||||
if [ $GOGS_DOMAIN_NAME ]; then
|
||||
function_check create_avahi_service
|
||||
create_avahi_service git http tcp "$GIT_ONION_PORT"
|
||||
fi
|
||||
|
|
|
@ -584,7 +584,7 @@ function add_users_after_install {
|
|||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||
if [[ "$USERNAME" != "$ADMIN_USERNAME" ]]; then
|
||||
if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then
|
||||
valstr=$"Login for user ${USERNAME}="
|
||||
#valstr=$"Login for user ${USERNAME}="
|
||||
app_password="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
||||
"add_user_${app_name}" "${USERNAME}" "${app_password}"
|
||||
echo "${app_name}_${USERNAME}" >> "$APP_USERS_FILE"
|
||||
|
|
|
@ -1055,6 +1055,9 @@ function setup_utils {
|
|||
function_check install_avahi
|
||||
install_avahi
|
||||
|
||||
function_check keep_avahi_running
|
||||
keep_avahi_running
|
||||
|
||||
function_check create_avahi_onion_domains
|
||||
create_avahi_onion_domains
|
||||
|
||||
|
|
|
@ -1143,23 +1143,88 @@ function install_web_local_user_interface {
|
|||
# similar to Plinth or the yunohost admin interface
|
||||
local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
|
||||
|
||||
mkdir -p "/var/www/${local_hostname}/htdocs"
|
||||
if [ ! -d "/var/www/${local_hostname}/htdocs" ]; then
|
||||
mkdir -p "/var/www/${local_hostname}/htdocs"
|
||||
fi
|
||||
|
||||
{ echo '<html>';
|
||||
echo ' <body>';
|
||||
echo " This is a test on $local_hostname";
|
||||
echo " This is a test on ${local_hostname}";
|
||||
echo ' </body>';
|
||||
echo '</html>'; } > "/var/www/${local_hostname}/htdocs/index.html"
|
||||
chown -R www-data:www-data "/var/www/${local_hostname}/htdocs"
|
||||
|
||||
nginx_file=/etc/nginx/sites-available/$local_hostname
|
||||
{ echo 'server {';
|
||||
echo ' listen 80;';
|
||||
echo ' listen [::]:80;';
|
||||
echo ' listen 80 default_server;';
|
||||
echo ' #listen [::]:80;';
|
||||
echo " server_name ${local_hostname};";
|
||||
echo " root /var/www/${local_hostname}/htdocs;";
|
||||
echo ' index index.html;';
|
||||
echo '}'; } > "$nginx_file"
|
||||
nginx_ensite "$local_hostname"
|
||||
echo '';
|
||||
echo ' access_log /dev/null;';
|
||||
echo ' error_log /dev/null;';
|
||||
echo '';
|
||||
echo ' location /icons {';
|
||||
echo ' autoindex on;';
|
||||
echo ' break;';
|
||||
echo ' }';
|
||||
echo '';
|
||||
echo ' rewrite ^/plinth/(.*)$ /api.json last;';
|
||||
echo '';
|
||||
echo ' location / {';
|
||||
echo " root /var/www/${local_hostname}/htdocs/plinth;";
|
||||
echo ' index api.json /api.json;';
|
||||
echo " error_page 405 = \$uri;";
|
||||
echo ' }';
|
||||
echo '}';
|
||||
echo '';
|
||||
echo 'server {';
|
||||
echo ' listen 443 default_server ssl;';
|
||||
echo ' #listen [::]:443 ssl;';
|
||||
echo " server_name ${local_hostname};";
|
||||
echo " root /var/www/${local_hostname}/htdocs;";
|
||||
echo ' index index.html;';
|
||||
echo '';
|
||||
echo ' access_log /dev/null;';
|
||||
echo ' error_log /dev/null;';
|
||||
echo ''; } > "$nginx_file"
|
||||
|
||||
nginx_ssl "${local_hostname}"
|
||||
nginx_security_options "${local_hostname}"
|
||||
|
||||
{ echo ' add_header Strict-Transport-Security max-age=0;';
|
||||
echo '';
|
||||
echo ' location /icons {';
|
||||
echo ' autoindex on;';
|
||||
echo ' break;';
|
||||
echo ' }';
|
||||
echo '';
|
||||
echo ' rewrite ^/plinth/(.*)$ /api.json last;';
|
||||
echo '';
|
||||
echo ' location / {';
|
||||
echo " root /var/www/${local_hostname}/htdocs/plinth;";
|
||||
echo ' index api.json /api.json;';
|
||||
echo " error_page 405 = \$uri;";
|
||||
echo ' }';
|
||||
echo '}'; } >> "$nginx_file"
|
||||
|
||||
if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
|
||||
"${PROJECT_NAME}-addcert" -h "${local_hostname}" --dhkey "${DH_KEYLENGTH}"
|
||||
fi
|
||||
|
||||
sed -i "s|ssl_certificate .*|ssl_certificate /etc/ssl/certs/${local_hostname}.crt;|g" "$nginx_file"
|
||||
sed -i "s|ssl_certificate_key .*|ssl_certificate_key /etc/ssl/private/${local_hostname}.key;|g" "$nginx_file"
|
||||
|
||||
nginx_ensite "${local_hostname}"
|
||||
|
||||
# Compatibility with FreedomBox android app
|
||||
# The installed apps get published to a json file called api.json
|
||||
# in this directory
|
||||
if [ ! -d "/var/www/${local_hostname}/htdocs/plinth" ]; then
|
||||
mkdir -p "/var/www/${local_hostname}/htdocs/plinth"
|
||||
fi
|
||||
|
||||
chown -R www-data:www-data "/var/www/${local_hostname}/htdocs"
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -3,33 +3,26 @@
|
|||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2016-11-12 Sat 20:17 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title></title>
|
||||
<meta name="generator" content="Org mode" />
|
||||
<meta name="author" content="Bob Mottram" />
|
||||
<meta name="description" content="How to use DLNA"
|
||||
<!-- 2018-05-25 Fri 23:15 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="Org-mode" />
|
||||
<meta name="author" content="Bob Mottram" />
|
||||
<meta name="description" content="How to use DLNA"
|
||||
/>
|
||||
<meta name="keywords" content="freedombone, dlna" />
|
||||
<meta name="keywords" content="freedombone, dlna" />
|
||||
<style type="text/css">
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
.title { text-align: center;
|
||||
margin-bottom: .2em; }
|
||||
.subtitle { text-align: center;
|
||||
font-size: medium;
|
||||
font-weight: bold;
|
||||
margin-top:0; }
|
||||
.title { text-align: center; }
|
||||
.todo { font-family: monospace; color: red; }
|
||||
.done { font-family: monospace; color: green; }
|
||||
.priority { font-family: monospace; color: orange; }
|
||||
.done { color: green; }
|
||||
.tag { background-color: #eee; font-family: monospace;
|
||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
||||
.timestamp { color: #bebebe; }
|
||||
.timestamp-kwd { color: #5f9ea0; }
|
||||
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||||
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||||
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
||||
.right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||||
.left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||||
.center { margin-left: auto; margin-right: auto; text-align: center; }
|
||||
.underline { text-decoration: underline; }
|
||||
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
||||
p.verse { margin-left: 3%; }
|
||||
|
@ -56,110 +49,27 @@
|
|||
border: 1px solid black;
|
||||
}
|
||||
pre.src:hover:before { display: inline;}
|
||||
/* Languages per Org manual */
|
||||
pre.src-asymptote:before { content: 'Asymptote'; }
|
||||
pre.src-awk:before { content: 'Awk'; }
|
||||
pre.src-C:before { content: 'C'; }
|
||||
/* pre.src-C++ doesn't work in CSS */
|
||||
pre.src-clojure:before { content: 'Clojure'; }
|
||||
pre.src-css:before { content: 'CSS'; }
|
||||
pre.src-D:before { content: 'D'; }
|
||||
pre.src-ditaa:before { content: 'ditaa'; }
|
||||
pre.src-dot:before { content: 'Graphviz'; }
|
||||
pre.src-calc:before { content: 'Emacs Calc'; }
|
||||
pre.src-sh:before { content: 'sh'; }
|
||||
pre.src-bash:before { content: 'sh'; }
|
||||
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||||
pre.src-fortran:before { content: 'Fortran'; }
|
||||
pre.src-gnuplot:before { content: 'gnuplot'; }
|
||||
pre.src-haskell:before { content: 'Haskell'; }
|
||||
pre.src-java:before { content: 'Java'; }
|
||||
pre.src-js:before { content: 'Javascript'; }
|
||||
pre.src-latex:before { content: 'LaTeX'; }
|
||||
pre.src-ledger:before { content: 'Ledger'; }
|
||||
pre.src-lisp:before { content: 'Lisp'; }
|
||||
pre.src-lilypond:before { content: 'Lilypond'; }
|
||||
pre.src-lua:before { content: 'Lua'; }
|
||||
pre.src-matlab:before { content: 'MATLAB'; }
|
||||
pre.src-mscgen:before { content: 'Mscgen'; }
|
||||
pre.src-ocaml:before { content: 'Objective Caml'; }
|
||||
pre.src-octave:before { content: 'Octave'; }
|
||||
pre.src-org:before { content: 'Org mode'; }
|
||||
pre.src-oz:before { content: 'OZ'; }
|
||||
pre.src-plantuml:before { content: 'Plantuml'; }
|
||||
pre.src-processing:before { content: 'Processing.js'; }
|
||||
pre.src-python:before { content: 'Python'; }
|
||||
pre.src-R:before { content: 'R'; }
|
||||
pre.src-ruby:before { content: 'Ruby'; }
|
||||
pre.src-sass:before { content: 'Sass'; }
|
||||
pre.src-scheme:before { content: 'Scheme'; }
|
||||
pre.src-screen:before { content: 'Gnu Screen'; }
|
||||
pre.src-sed:before { content: 'Sed'; }
|
||||
pre.src-sh:before { content: 'shell'; }
|
||||
pre.src-sql:before { content: 'SQL'; }
|
||||
pre.src-sqlite:before { content: 'SQLite'; }
|
||||
/* additional languages in org.el's org-babel-load-languages alist */
|
||||
pre.src-forth:before { content: 'Forth'; }
|
||||
pre.src-io:before { content: 'IO'; }
|
||||
pre.src-J:before { content: 'J'; }
|
||||
pre.src-makefile:before { content: 'Makefile'; }
|
||||
pre.src-maxima:before { content: 'Maxima'; }
|
||||
pre.src-perl:before { content: 'Perl'; }
|
||||
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
||||
pre.src-scala:before { content: 'Scala'; }
|
||||
pre.src-shell:before { content: 'Shell Script'; }
|
||||
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
||||
/* additional language identifiers per "defun org-babel-execute"
|
||||
in ob-*.el */
|
||||
pre.src-cpp:before { content: 'C++'; }
|
||||
pre.src-abc:before { content: 'ABC'; }
|
||||
pre.src-coq:before { content: 'Coq'; }
|
||||
pre.src-groovy:before { content: 'Groovy'; }
|
||||
/* additional language identifiers from org-babel-shell-names in
|
||||
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
||||
the execution function name together. */
|
||||
pre.src-bash:before { content: 'bash'; }
|
||||
pre.src-csh:before { content: 'csh'; }
|
||||
pre.src-ash:before { content: 'ash'; }
|
||||
pre.src-dash:before { content: 'dash'; }
|
||||
pre.src-ksh:before { content: 'ksh'; }
|
||||
pre.src-mksh:before { content: 'mksh'; }
|
||||
pre.src-posh:before { content: 'posh'; }
|
||||
/* Additional Emacs modes also supported by the LaTeX listings package */
|
||||
pre.src-ada:before { content: 'Ada'; }
|
||||
pre.src-asm:before { content: 'Assembler'; }
|
||||
pre.src-caml:before { content: 'Caml'; }
|
||||
pre.src-delphi:before { content: 'Delphi'; }
|
||||
pre.src-html:before { content: 'HTML'; }
|
||||
pre.src-idl:before { content: 'IDL'; }
|
||||
pre.src-mercury:before { content: 'Mercury'; }
|
||||
pre.src-metapost:before { content: 'MetaPost'; }
|
||||
pre.src-modula-2:before { content: 'Modula-2'; }
|
||||
pre.src-pascal:before { content: 'Pascal'; }
|
||||
pre.src-ps:before { content: 'PostScript'; }
|
||||
pre.src-prolog:before { content: 'Prolog'; }
|
||||
pre.src-simula:before { content: 'Simula'; }
|
||||
pre.src-tcl:before { content: 'tcl'; }
|
||||
pre.src-tex:before { content: 'TeX'; }
|
||||
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
||||
pre.src-verilog:before { content: 'Verilog'; }
|
||||
pre.src-vhdl:before { content: 'VHDL'; }
|
||||
pre.src-xml:before { content: 'XML'; }
|
||||
pre.src-nxml:before { content: 'XML'; }
|
||||
/* add a generic configuration mode; LaTeX export needs an additional
|
||||
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
||||
pre.src-conf:before { content: 'Configuration File'; }
|
||||
pre.src-R:before { content: 'R'; }
|
||||
pre.src-perl:before { content: 'Perl'; }
|
||||
pre.src-java:before { content: 'Java'; }
|
||||
pre.src-sql:before { content: 'SQL'; }
|
||||
|
||||
table { border-collapse:collapse; }
|
||||
caption.t-above { caption-side: top; }
|
||||
caption.t-bottom { caption-side: bottom; }
|
||||
td, th { vertical-align:top; }
|
||||
th.org-right { text-align: center; }
|
||||
th.org-left { text-align: center; }
|
||||
th.org-center { text-align: center; }
|
||||
td.org-right { text-align: right; }
|
||||
td.org-left { text-align: left; }
|
||||
td.org-center { text-align: center; }
|
||||
th.right { text-align: center; }
|
||||
th.left { text-align: center; }
|
||||
th.center { text-align: center; }
|
||||
td.right { text-align: right; }
|
||||
td.left { text-align: left; }
|
||||
td.center { text-align: center; }
|
||||
dt { font-weight: bold; }
|
||||
.footpara { display: inline; }
|
||||
.footpara:nth-child(2) { display: inline; }
|
||||
.footpara { display: block; }
|
||||
.footdef { margin-bottom: 1em; }
|
||||
.figure { padding: 1em; }
|
||||
.figure p { text-align: center; }
|
||||
|
@ -179,7 +89,6 @@
|
|||
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
||||
.org-info-js_search-highlight
|
||||
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
||||
.org-svg { width: 90%; }
|
||||
/*]]>*/-->
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="freedombone.css" />
|
||||
|
@ -235,18 +144,16 @@ for the JavaScript code in this tag.
|
|||
<a name="top" id="top"></a>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="org-center">
|
||||
<h1 class="title"></h1>
|
||||
|
||||
<div class="figure">
|
||||
<p><img src="images/logo.png" alt="logo.png" />
|
||||
<p><img src="images/logo.png" alt="logo.png" width="80%" height="10%" align="center" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<center>
|
||||
<h1>DLNA</h1>
|
||||
</center>
|
||||
|
||||
<div id="outline-container-sec-1" class="outline-2">
|
||||
<h2 id="sec-1">DLNA</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
An easy way to play music on any mobile device in your home is to use the DLNA service. Copy your music into a directory called "<i>Music</i>" on an unencrypted USB thumb drive and then insert it into a USB socket on the Freedombone system.
|
||||
</p>
|
||||
|
@ -256,6 +163,7 @@ ssh into the system with:
|
|||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">ssh myusername@mydomain.com -p 2222
|
||||
</pre>
|
||||
</div>
|
||||
|
@ -268,14 +176,12 @@ Select <b>Administrator controls</b> then <b>App Settings</b> then <b>dlna</b>.
|
|||
The system will scan the <i>Music</i> directory, which could take a while if there are thousands of files, but you don't need to do anything further other than perhaps to log out by selecting <b>Exit</b> a couple of times.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you have an Android device then go to F-Droid (if you don't already have it installed then it can be <a href="https://f-droid.org/">downloaded here</a>) and search for <b>ControlDLNA</b>. On running the app you should see a red Debian icon which you can press on, then you may need to select "local". After a few seconds the list of albums or tracks should then appear and you can browse and play them.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The DLNA service will only work within your local home network, and isn't remotely accessible from other locations via the internet. That can be both a good and a bad thing. Another consideration is that there are <i>no access controls</i> on DLNA services, so any music or videos on the USB drive will be playable by anyone within your home network.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
|
||||
<style type="text/css">
|
||||
|
|