This commit is contained in:
Bob Mottram 2017-11-27 12:39:41 +00:00
commit 15bc6b1f91
8 changed files with 1332 additions and 111 deletions

64
doc/EN/app_icecast.org Normal file
View File

@ -0,0 +1,64 @@
#+TITLE:
#+AUTHOR: Bob Mottram
#+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombone, icecast
#+DESCRIPTION: How to use Icecast
#+OPTIONS: ^:nil toc:nil
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="freedombone.css" />
#+BEGIN_CENTER
[[file:images/logo.png]]
#+END_CENTER
#+BEGIN_EXPORT html
<center>
<h1>Icecast</h1>
</center>
#+END_EXPORT
Icecast enables you to run something like an internet radio station. So if you have multiple audio files and want to be able to stream those in sequence from a web site then this can be useful.
This system is available only via an onion address, which should mitigate the potential for copyright disputes over streamed content. By default it's only set up to stream to a small number of users so that it doesn't put too much stress on CPU or memory requirements, although you can increase the maximum limit if you have a more powerful system and enough bandwidth.
* Installation
Log into your system with:
#+begin_src bash
ssh myusername@mydomain -p 2222
#+end_src
Using cursor keys, space bar and Enter key select *Administrator controls* and type in your password.
Select *Add/Remove Apps*. If Vim is selected then you might want to unselect and uninstall it first, then select *icecast*.
If you then go to the *About* screen you'll see the onion address for Icecast and can navigate to it in a Tor compatible browser.
* Adding files to be streamed
There are two ways to get files onto the system: either via ssh or via a USB drive. File types can be *ogg, ogv, mp3 or mp4* format.
It may take a while for the files to import, especially on a low power single board computer, since any mp3 or mp4 files will be converted to ogg or ogv. If you want to speed this up then you could do this conversion manually on a laptop with ffmpeg before storing files onto the USB drive or uploading them via ssh.
** From a USB drive
Create a directory on the USB drive named *icestream* and copy your files into there. Plug the drive into your server.
Go to the *Administrator control panel*, select *App settings*, then *icecast*, then *Import stream files from USB drive*.
** Via ssh
Make a directory named *icestream* and copy your files into it. Then copy the directory to your server.
#+begin_src bash
scp -r -P 2222 icestream myusername@mydomain:/home/myusername
#+end_src
Log into your server with:
#+begin_src bash
ssh myusername@mydomain -p 2222
#+end_src
Select *Administrator controls*, enter your password, then go to *App settings* followed by *icecast* and *Import stream files*. Choose the directory with up and down cursors and space bar to select.
* Access controls
By default anyone who happens to find your Icecast onion address can listen to your stream. If you only want it to be available to a few friends or family then you can add an extra login password.
Go to the *Administrator control panel*, select *App settings*, then *icecast*, then *Enable login for stream users*. Take a note of the password and you can give that out to whoever needs access, preferably via an encrypted chat app or sneakernet. If you need to copy and paste then hold the shift key while highlighting the password.

View File

@ -68,6 +68,10 @@ Databaseless blogging system. Quite simple and with a markdown-like format.
Web publishing platform with social network like features and good privacy controls so that it's possible to specify who can see which content. Includes photo albums, calendar, wiki and file storage.
[[./app_hubzilla.html][How to use it]]
* Icecast media stream
Make your own internet radio station.
[[./app_icecast.html][How to use it]]
* IRC Server (ngirc)
Run your own IRC chat channel which can be secured with a password and accessible via an onion address. A bouncer is included so that you can receive messages sent while you were offline. Works with Hexchat and other popular clients.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 22 KiB

765
src/freedombone-app-icecast Executable file
View File

@ -0,0 +1,765 @@
#!/bin/bash
#
# .---. . .
# | | |
# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
# | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
# ' ' --' --' -' - -' ' ' -' -' -' ' - --'
#
# Freedom in the Cloud
#
# Icecast application
#
# Notes: An attempt was made to get ices2 running with systemd, but that
# was very unsuccessful. Instead there's a hacky cron entry which
# starts icecast2 and ices2 if necessary
#
# License
# =======
#
# Copyright (C) 2017 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/>.
VARIANTS='full'
IN_DEFAULT_INSTALL=0
SHOW_ON_ABOUT=1
SHOW_ICANN_ADDRESS_ON_ABOUT=0
ICECAST_DOMAIN_NAME=
ICECAST_CODE=
ICECAST_PORT=8005
ICECAST_ONION_PORT=8146
ICECAST_DIR=/icestream
ICECAST_PLAYLIST_FILE=/etc/ices2/playlist.txt
ICECAST_LOGIN_TEXT=$"Icecast login"
icecast_variables=(MY_USERNAME
MY_EMAIL_ADDRESS
ONION_ONLY
ICECAST_DOMAIN_NAME
ICECAST_CODE
DEFAULT_LANGUAGE)
function icecast_rescan {
if [ -d $ICECAST_DIR ]; then
if [ -f $ICECAST_PLAYLIST_FILE ]; then
rm $ICECAST_PLAYLIST_FILE
fi
icecast_add_file_to_playlist $ICECAST_DIR
fi
}
function icecast_update_daemon {
systemctl stop icecast2
if [ -f /etc/init.d/icecast2 ]; then
rm /etc/init.d/icecast2
fi
echo '#!/bin/sh' > /usr/bin/stop_icecast
echo 'kill $(pidof ices2)' >> /usr/bin/stop_icecast
echo 'systemctl stop icecast2' >> /usr/bin/stop_icecast
chmod +x /usr/bin/stop_icecast
# Note that the sleep here actually is important
echo '#!/bin/bash' > /usr/bin/start_icecast
echo 'isrunning=$(ps aux | grep ices2)' >> /usr/bin/start_icecast
echo 'if [[ "$isrunning" != *"ices-playlist"* ]]; then' >> /usr/bin/start_icecast
echo ' systemctl start icecast2' >> /usr/bin/start_icecast
echo ' sleep 3' >> /usr/bin/start_icecast
echo ' cd /etc/ices2' >> /usr/bin/start_icecast
echo ' ices2 ices-playlist.xml' >> /usr/bin/start_icecast
echo 'fi' >> /usr/bin/start_icecast
chmod +x /usr/bin/start_icecast
echo '[Unit]' > /etc/systemd/system/icecast2.service
echo 'Description=Icecast' >> /etc/systemd/system/icecast2.service
echo 'After=network.target' >> /etc/systemd/system/icecast2.service
echo 'After=tor.service' >> /etc/systemd/system/icecast2.service
echo '' >> /etc/systemd/system/icecast2.service
echo '[Service]' >> /etc/systemd/system/icecast2.service
echo 'User=icecast2' >> /etc/systemd/system/icecast2.service
echo 'Group=icecast' >> /etc/systemd/system/icecast2.service
echo 'ExecStart=/usr/bin/icecast2 -c /etc/icecast2/icecast.xml' >> /etc/systemd/system/icecast2.service
echo 'Restart=on-failure' >> /etc/systemd/system/icecast2.service
echo 'RestartSec=10' >> /etc/systemd/system/icecast2.service
echo '' >> /etc/systemd/system/icecast2.service
echo '[Install]' >> /etc/systemd/system/icecast2.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/icecast2.service
chown -R icecast2:icecast /etc/ices2
chown -R icecast2:icecast /etc/icecast2
systemctl daemon-reload
systemctl enable icecast2
if ! grep -q "start_icecast" /etc/crontab; then
echo '*/1 * * * * root /usr/bin/start_icecast > /dev/null' >> /etc/crontab
fi
}
function change_password_icecast {
curr_username="$1"
new_user_password="$2"
stop_icecast
sed -i -e "s|<source-password>[^<]*</source-password>|<source-password>$new_user_password</source-password>|" \
-e "s|<relay-password>[^<]*</relay-password>|<relay-password>$new_user_password</relay-password>|" \
-e "s|<admin-password>[^<]*</admin-password>|<admin-password>$new_user_password</admin-password>|" \
/etc/icecast2/icecast.xml
sed -i "s|<password>.*|<password>${new_user_password}</password>|g" /etc/ices2/ices-playlist.xml
${PROJECT_NAME}-pass -u "$curr_username" -a icecast -p "$new_user_password"
start_icecast
}
function logging_on_icecast {
echo -n ''
}
function logging_off_icecast {
echo -n ''
}
function reconfigure_icecast {
echo -n ''
}
function icecast_convert_files {
clear
cd ${1}
echo $'Converting any mp3 files to ogg format'
find . -type f -name '*.mp3' -exec bash -c 'ffmpeg -i "$0" -c:a libvorbis -q:a 4 "${0/%mp3/ogg}"' '{}' \;
find . -name "*.mp3" -print0 | xargs -0 rm -f
echo $'Converting any mp4 files to ogv format'
find . -type f -name '*.mp4' -exec bash -c 'ffmpeg -i "$0" -c:a libvorbis -q:a 4 "${0/%mp3/ogv}"' '{}' \;
find . -name "*.mp4" -print0 | xargs -0 rm -f
chown -R icecast2:icecast $ICECAST_DIR
}
function icecast_add_file_to_playlist {
files_dir=${1}
if [ ! -d $files_dir ]; then
return
fi
echo $'Adding ogg files to playlist'
find $files_dir -type f -name '*.ogg' -print0 | while read -d $'\0' file; do
if ! grep -q "$file" $ICECAST_PLAYLIST_FILE; then
echo "$file" >> $ICECAST_PLAYLIST_FILE
fi
done
echo $'Adding ogv files to playlist'
find $files_dir -type f -name '*.ogv' -print0 | while read -d $'\0' file; do
if ! grep -q "$file" $ICECAST_PLAYLIST_FILE; then
echo "$file" >> $ICECAST_PLAYLIST_FILE
fi
done
chown icecast2:icecast $ICECAST_PLAYLIST_FILE
stop_icecast
start_icecast
}
function icecast_import_from_directory {
data=$(tempfile 2>/dev/null)
dialog --title "Choose a directory containing stream files" --dselect /home/$MY_USERNAME/ 30 60 2> $data
selected_dir=$(cat $data)
rm $data
if [[ "$selected_dir" == "$ICECAST_DIR" ]]; then
return
fi
if [ ! -d $selected_dir ]; then
return
fi
if [[ "$selected_dir" == "/home/$MY_USERNAME/" ]]; then
return
fi
if [[ "$selected_dir" == "/home/$MY_USERNAME/."* ]]; then
return
fi
if [[ "$selected_dir" == *"/Maildir" || "$selected_dir" == *"/Sync" ]]; then
return
fi
dialog --title $"Import stream files directory into Icecast" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno $"\nImport the directory:\n\n $selected_dir" 12 75
sel=$?
case $sel in
1) return;;
255) return;;
esac
if [ ! -d $ICECAST_DIR ]; then
mkdir -p $ICECAST_DIR
fi
dest_dir=$(basename "$selected_dir")
mv "$selected_dir" $ICECAST_DIR
icecast_convert_files $ICECAST_DIR/$dest_dir
icecast_add_file_to_playlist $ICECAST_DIR/$dest_dir
dialog --title $"Import stream files directory into Icecast" \
--msgbox $"Import success" 6 40
}
function icecast_import_from_usb {
clear
detect_usb_drive
if [ ! -b $USB_DRIVE ]; then
dialog --title $"Import stream files from USB drive" --msgbox $'No USB drive found' 6 50
return
fi
backup_mount_drive ${USB_DRIVE}
if [ ! -d $USB_MOUNT$ICECAST_DIR ]; then
dialog --title $"Import stream files from USB drive" --msgbox $'No stream files directory found on USB drive' 6 50
backup_unmount_drive ${USB_DRIVE}
fi
cp -ru $USB_MOUNT$ICECAST_DIR/* $ICECAST_DIR
backup_unmount_drive ${USB_DRIVE}
icecast_convert_files $ICECAST_DIR
dialog --title $"Import stream files from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
}
function icecast_export_to_usb {
clear
detect_usb_drive
if [ ! -b $USB_DRIVE ]; then
dialog --title $"Export stream files to USB drive" --msgbox $'No USB drive found' 6 50
return
fi
backup_mount_drive ${USB_DRIVE}
if [ ! -d $USB_MOUNT$ICECAST_DIR ]; then
mkdir -p $USB_MOUNT$ICECAST_DIR
fi
cp -ru $ICECAST_DIR/* $USB_MOUNT$ICECAST_DIR
backup_unmount_drive ${USB_DRIVE}
dialog --title $"Export stream files to USB drive" --msgbox $'Export complete. You may now remove the USB drive' 6 50
}
function icecast_format_drive {
detect_usb_drive
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Format USB drive $USB_DRIVE for stream file storage" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno $"\nPlease confirm that you wish to format drive\n\n ${USB_DRIVE}\n\nAll current data on the drive will be lost, and you will be prompted to give a password used to encrypt the drive.\n\nDANGER: If you screw up here and format the wrong drive it's your own fault!" 16 60
sel=$?
case $sel in
1) return;;
255) return;;
esac
rm $data
clear
echo ''
echo $"Formatting drive $USB_DRIVE. ALL CONTENTS WILL BE LOST."
echo ''
${PROJECT_NAME}-format $USB_DRIVE
dialog --title $"Format USB drive $USB_DRIVE for stream file storage" --msgbox $'Format complete. You may now export stream files or remove the USB drive' 6 50
}
function icecast_edit_playlist {
editor $ICECAST_PLAYLIST_FILE
stop_icecast
start_icecast
}
function icecast_change_login {
read_config_param $MY_USERNAME
ICECAST_USER_PASSWORD=$(${PROJECT_NAME}-pass -u $MY_USERNAME -a icecastuser)
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Change Icecast stream visitor login" \
--backtitle $"Freedombone Control Panel" \
--inputbox $"Enter the new login password for stream visitors" 8 60 "$ICECAST_USER_PASSWORD" 2>$data
sel=$?
case $sel in
0) ICECAST_USER_PASSWORD=$(<$data)
if [[ "$ICECAST_USER_PASSWORD" != *' '* ]]; then
if [ ${#ICECAST_USER_PASSWORD} -gt 8 ]; then
${PROJECT_NAME}-pass -u $MY_USERNAME -a icecastuser -p $ICECAST_USER_PASSWORD
dialog --title $"Change Icecast stream visitor login" \
--msgbox $"Password changed to $ICECAST_USER_PASSWORD" 6 75
fi
fi
;;
esac
rm $data
}
function icecast_enable_login {
dialog --title $"Enable Icecast login" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno $"\nDo you want to add a login so that random web users can't access your stream?" 10 60
sel=$?
case $sel in
0) if grep -q '#auth_basic' /etc/nginx/sites-available/icecast; then
sed -i 's|#auth_basic|auth_basic|g' /etc/nginx/sites-available/icecast
systemctl restart nginx
fi
read_config_param $MY_USERNAME
ICECAST_USER_PASSWORD=$(${PROJECT_NAME}-pass -u $MY_USERNAME -a icecastuser)
dialog --title $"Enable Icecast login" \
--msgbox $"Icecast logins are now enabled with the password $ICECAST_USER_PASSWORD" 6 65
ICECAST_USER_PASSWORD=
;;
1) if ! grep -q '#auth_basic' /etc/nginx/sites-available/icecast; then
sed -i 's|auth_basic|#auth_basic|g' /etc/nginx/sites-available/icecast
systemctl restart nginx
fi
dialog --title $"Disable Icecast login" \
--msgbox $"Icecast logins are now disabled. Anyone can access your stream." 6 65
;;
esac
}
function icecast_set_stream_name {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Control Panel" \
--title $"Change Icecast stream details" \
--form "\n" 8 60 4 \
$"Stream name:" 1 1 "Example stream name" 1 18 40 1000 \
$"Description:" 2 1 "A short description of your stream" 2 18 40 1000 \
$"Genre:" 3 1 "Example genre" 3 18 40 1000 \
2> $data
sel=$?
case $sel in
1) return;;
255) return;;
esac
stream_name=$(cat $data | sed -n 1p)
stream_description=$(cat $data | sed -n 2p)
stream_genre=$(cat $data | sed -n 3p)
if [ ${#stream_name} -gt 2 ]; then
sed -i "s|<name>.*|<name>${stream_name}</name>|g" /etc/ices2/ices-playlist.xml
fi
if [ ${#stream_description} -gt 2 ]; then
sed -i "s|<description>.*|<description>${stream_description}</description>|g" /etc/ices2/ices-playlist.xml
fi
if [ ${#stream_genre} -gt 2 ]; then
sed -i "s|<genre>.*|<genre>${stream_genre}</genre>|g" /etc/ices2/ices-playlist.xml
fi
rm $data
stop_icecast
start_icecast
}
function icecast_set_maximum_streams {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Set the maximum clients" \
--backtitle $"Freedombone Control Panel" \
--inputbox $"Maximum number of clients" 8 40 "10" 2>$data
sel=$?
case $sel in
0)
max_clients=$(<$data)
if [ ${#max_clients} -gt 0 ]; then
if [[ "$max_clients" != *' '* ]]; then
if [[ $max_clients =~ '^[0-9]+$' ]] ; then
sed -i "s|<clients>.*|<clients>${max_clients}</clients>|g" /etc/icecast2/icecast.xml
stop_icecast
start_icecast
dialog --title $"Set the maximum clients" \
--msgbox $"\nMaximum Icecast clients was set to ${max_clients}" 8 50
fi
fi
fi
;;
esac
rm $data
}
function configure_interactive_icecast {
while true
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Control Panel" \
--title $"Icecast" \
--radiolist $"Choose an operation:" 19 70 12 \
1 $"Import stream files from directory" off \
2 $"Import stream files from USB drive" off \
3 $"Format a USB drive for stream file storage" off \
4 $"Export stream files to USB drive" off \
5 $"Manually edit playlist" off \
6 $"Enable login for stream visitors" off \
7 $"Change password for stream visitors" off \
8 $"Re-scan playlist" off \
9 $"Restart stream" off \
10 $"Set Stream Name/Description/Genre" off \
11 $"Set maximum number of clients/streams" off \
12 $"Exit" on 2> $data
sel=$?
case $sel in
1) break;;
255) break;;
esac
case $(cat $data) in
1) icecast_import_from_directory;;
2) icecast_import_from_usb;;
3) icecast_format_drive;;
4) icecast_export_to_usb;;
5) icecast_edit_playlist;;
6) icecast_enable_login;;
7) icecast_change_login;;
8) clear
echo $'Rescanning Icecast playlist'
icecast_rescan;;
9) clear
echo $'Restarting Icecast stream'
stop_icecast
start_icecast;;
10) icecast_set_stream_name;;
11) icecast_set_maximum_streams;;
12) break;;
esac
done
}
function upgrade_icecast {
icecast_update_daemon
}
function backup_local_icecast {
if [ ! -d $ICECAST_DIR ]; then
return
fi
stop_icecast
cp /etc/nginx/.icepasswd $ICECAST_DIR
cp /etc/ices2/ices-playlist.xml $ICECAST_DIR
function_check backup_directory_to_usb
backup_directory_to_usb $ICECAST_DIR icecast
rm $ICECAST_DIR/.icepasswd
start_icecast
}
function restore_local_icecast {
if [ ! -d $ICECAST_DIR ]; then
return
fi
stop_icecast
temp_restore_dir=/root/tempicecast
function_check restore_directory_from_usb
restore_directory_from_usb $temp_restore_dir icecast
if [ -d $temp_restore_dir$ICECAST_DIR ]; then
cp -r $temp_restore_dir$ICECAST_DIR $ICECAST_DIR/
else
cp -r $temp_restore_dir/* $ICECAST_DIR/*
fi
cp $ICECAST_DIR/.icepasswd /etc/nginx/.icepasswd
rm $ICECAST_DIR/.icepasswd
cp $ICECAST_DIR/ices-playlist.xml /etc/ices2
rm $ICECAST_DIR/ices-playlist.xml
chown -R icecast2:icecast $ICECAST_DIR
chown -R icecast2:icecast /etc/ices2
start_icecast
rm -rf $temp_restore_dir
}
function backup_remote_icecast {
if [ ! -d $ICECAST_DIR ]; then
return
fi
stop_icecast
cp /etc/nginx/.icepasswd $ICECAST_DIR
cp /etc/ices2/ices-playlist.xml $ICECAST_DIR
function_check backup_directory_to_friend
backup_directory_to_friend $ICECAST_DIR icecast
rm $ICECAST_DIR/.icepasswd
start_icecast
}
function restore_remote_icecast {
if [ ! -d $ICECAST_DIR ]; then
return
fi
stop_icecast
temp_restore_dir=/root/tempicecast
function_check restore_directory_from_friend
restore_directory_from_friend $temp_restore_dir icecast
if [ -d $temp_restore_dir$ICECAST_DIR ]; then
cp -r $temp_restore_dir$ICECAST_DIR $ICECAST_DIR/
else
cp -r $temp_restore_dir/* $ICECAST_DIR/*
fi
cp $ICECAST_DIR/.icepasswd /etc/nginx/.icepasswd
rm $ICECAST_DIR/.icepasswd
cp $ICECAST_DIR/ices-playlist.xml /etc/ices2
rm $ICECAST_DIR/ices-playlist.xml
chown -R icecast2:icecast $ICECAST_DIR
start_icecast
rm -rf $temp_restore_dir
}
function remove_icecast {
nginx_dissite icecast
sed -i '/start_icecast/d' /etc/crontab
stop_icecast
systemctl disable icecast2
rm /etc/systemd/system/icecast2.service
rm /usr/bin/start_icecast
rm /usr/bin/stop_icecast
if [ -f /etc/nginx/sites-available/icecast ]; then
rm /etc/nginx/sites-available/icecast
fi
if [ -d /var/www/icecast ]; then
rm -rf /var/www/icecast
fi
apt-get -yq remove --purge icecast2
if [ -d /etc/icecast2 ]; then
rm -rf /etc/icecast2
fi
if [ -d /etc/ices2 ]; then
rm -rf /etc/ices2
fi
function_check remove_onion_service
remove_onion_service icecast ${ICECAST_ONION_PORT}
sed -i '/icecast/d' $COMPLETION_FILE
}
function install_icecast {
apt-get -yq install software-properties-common debconf-utils
apt-get -yq update
debconf-set-selections <<< "icecast2 icecast2/icecast-setup boolean false"
apt-get -yq install icecast2
apt-get -yq install ices2 ffmpeg apache2-utils
if [ ! -f /etc/icecast2/icecast.xml ]; then
echo $'Icecast not installed'
exit 7923528
fi
if [ ! ${ICECAST_PASSWORD} ]; then
if [ -f ${IMAGE_PASSWORD_FILE} ]; then
ICECAST_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
else
ICECAST_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
fi
fi
ICECAST_ONION_HOSTNAME=$(add_onion_service icecast 80 ${ICECAST_ONION_PORT})
sed -i -e "s|<source-password>[^<]*</source-password>|<source-password>$ICECAST_PASSWORD</source-password>|" \
-e "s|<relay-password>[^<]*</relay-password>|<relay-password>$ICECAST_PASSWORD</relay-password>|" \
-e "s|<admin-password>[^<]*</admin-password>|<admin-password>$ICECAST_PASSWORD</admin-password>|" \
-e "s|<hostname>[^<]*</hostname>|<hostname>$ICECAST_ONION_HOSTNAME</hostname>|" \
/etc/icecast2/icecast.xml
sed -i "s|<clients>.*|<clients>10</clients>|g" /etc/icecast2/icecast.xml
sed -i "s|<port>.*|<port>$ICECAST_PORT</port>|g" /etc/icecast2/icecast.xml
sed -i "s|<admin-user>.*|<admin-user>$MY_USERNAME</admin-user>|g" /etc/icecast2/icecast.xml
sed -i "s|<admin>.*|<admin>$MY_EMAIL_ADDRESS</admin>|g" /etc/icecast2/icecast.xml
sed -i "s|<location>.*|<location>The Interwebs</location>|g" /etc/icecast2/icecast.xml
#sed -i 's|<!-- <bind-address>.*|<bind-address>127.0.0.1</bind-address>|g' /etc/icecast2/icecast.xml
if [ ! -d /var/www/icecast/htdocs ]; then
mkdir -p /var/www/icecast/htdocs
fi
icecast_nginx_site=/etc/nginx/sites-available/icecast
echo 'server {' > $icecast_nginx_site
echo " listen 127.0.0.1:$ICECAST_ONION_PORT default_server;" >> $icecast_nginx_site
echo " server_name $ICECAST_ONION_HOSTNAME;" >> $icecast_nginx_site
echo '' >> $icecast_nginx_site
echo ' # Logs' >> $icecast_nginx_site
echo ' access_log /dev/null;' >> $icecast_nginx_site
echo ' error_log /dev/null;' >> $icecast_nginx_site
echo '' >> $icecast_nginx_site
echo ' location / {' >> $icecast_nginx_site
function_check nginx_limits
nginx_limits $ICECAST_ONION_HOSTNAME '15m'
echo " proxy_pass http://localhost:$ICECAST_PORT;" >> $icecast_nginx_site
echo " #auth_basic \"${ICECAST_LOGIN_TEXT}\";" >> $icecast_nginx_site
echo ' #auth_basic_user_file /etc/nginx/.icepasswd;' >> $icecast_nginx_site
echo ' }' >> $icecast_nginx_site
echo '}' >> $icecast_nginx_site
if [ ! -d /var/log/ices ]; then
mkdir -p /var/log/ices
fi
if [ ! -d /etc/ices2 ]; then
mkdir -p /etc/ices2
fi
echo '<?xml version="1.0"?>' > /etc/ices2/ices-playlist.xml
echo '<ices>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- run in background -->' >> /etc/ices2/ices-playlist.xml
echo ' <background>1</background>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- where logs, etc go. -->' >> /etc/ices2/ices-playlist.xml
echo ' <logpath>/var/log/ices</logpath>' >> /etc/ices2/ices-playlist.xml
echo ' <logfile>ices.log</logfile>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- 1=error,2=warn,3=info,4=debug -->' >> /etc/ices2/ices-playlist.xml
echo ' <loglevel>1</loglevel>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- set this to 1 to log to the console instead of to the file above -->' >> /etc/ices2/ices-playlist.xml
echo ' <consolelog>0</consolelog>' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <!-- optional filename to write process id to -->' >> /etc/ices2/ices-playlist.xml
echo ' <!-- <pidfile>/home/ices/ices.pid</pidfile> -->' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <stream>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- metadata used for stream listing (not currently used) -->' >> /etc/ices2/ices-playlist.xml
echo ' <metadata>' >> /etc/ices2/ices-playlist.xml
echo ' <name>Example stream name</name>' >> /etc/ices2/ices-playlist.xml
echo ' <genre>Example genre</genre>' >> /etc/ices2/ices-playlist.xml
echo ' <description>A short description of your stream</description>' >> /etc/ices2/ices-playlist.xml
echo ' </metadata>' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <!-- input module' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' The module used here is the playlist module - it has ' >> /etc/ices2/ices-playlist.xml
echo ' "submodules" for different types of playlist. There are' >> /etc/ices2/ices-playlist.xml
echo ' two currently implemented, "basic", which is a simple' >> /etc/ices2/ices-playlist.xml
echo ' file-based playlist, and "script" which invokes a command' >> /etc/ices2/ices-playlist.xml
echo ' to returns a filename to start playing. -->' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <input>' >> /etc/ices2/ices-playlist.xml
echo ' <module>playlist</module>' >> /etc/ices2/ices-playlist.xml
echo ' <param name="type">basic</param>' >> /etc/ices2/ices-playlist.xml
echo " <param name=\"file\">$ICECAST_PLAYLIST_FILE</param>" >> /etc/ices2/ices-playlist.xml
echo ' <!-- random play -->' >> /etc/ices2/ices-playlist.xml
echo ' <param name="random">0</param>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- if the playlist get updated that start at the beginning -->' >> /etc/ices2/ices-playlist.xml
echo ' <param name="restart-after-reread">0</param>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- if set to 1 , plays once through, then exits. -->' >> /etc/ices2/ices-playlist.xml
echo ' <param name="once">0</param>' >> /etc/ices2/ices-playlist.xml
echo ' </input>' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <!-- Stream instance' >> /etc/ices2/ices-playlist.xml
echo ' You may have one or more instances here. This allows you to ' >> /etc/ices2/ices-playlist.xml
echo ' send the same input data to one or more servers (or to different' >> /etc/ices2/ices-playlist.xml
echo ' mountpoints on the same server). Each of them can have different' >> /etc/ices2/ices-playlist.xml
echo ' parameters. This is primarily useful for a) relaying to multiple' >> /etc/ices2/ices-playlist.xml
echo ' independent servers, and b) encoding/reencoding to multiple' >> /etc/ices2/ices-playlist.xml
echo ' bitrates.' >> /etc/ices2/ices-playlist.xml
echo ' If one instance fails (for example, the associated server goes' >> /etc/ices2/ices-playlist.xml
echo ' down, etc), the others will continue to function correctly.' >> /etc/ices2/ices-playlist.xml
echo ' This example defines two instances as two mountpoints on the' >> /etc/ices2/ices-playlist.xml
echo ' same server. -->' >> /etc/ices2/ices-playlist.xml
echo ' <instance>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- Server details:' >> /etc/ices2/ices-playlist.xml
echo ' You define hostname and port for the server here, along with' >> /etc/ices2/ices-playlist.xml
echo ' the source password and mountpoint. -->' >> /etc/ices2/ices-playlist.xml
echo ' <hostname>localhost</hostname>' >> /etc/ices2/ices-playlist.xml
echo " <port>$ICECAST_PORT</port>" >> /etc/ices2/ices-playlist.xml
echo " <password>$ICECAST_PASSWORD</password>" >> /etc/ices2/ices-playlist.xml
echo ' <mount>/example1.ogg</mount>' >> /etc/ices2/ices-playlist.xml
echo ' <!-- Reconnect parameters:' >> /etc/ices2/ices-playlist.xml
echo ' When something goes wrong (e.g. the server crashes, or the' >> /etc/ices2/ices-playlist.xml
echo ' network drops) and ices disconnects from the server, these' >> /etc/ices2/ices-playlist.xml
echo ' control how often it tries to reconnect, and how many times' >> /etc/ices2/ices-playlist.xml
echo ' it tries to reconnect. Delay is in seconds.' >> /etc/ices2/ices-playlist.xml
echo ' If you set reconnectattempts to -1, it will continue ' >> /etc/ices2/ices-playlist.xml
echo ' indefinately. Suggest setting reconnectdelay to a large value' >> /etc/ices2/ices-playlist.xml
echo ' if you do this.' >> /etc/ices2/ices-playlist.xml
echo ' -->' >> /etc/ices2/ices-playlist.xml
echo ' <reconnectdelay>2</reconnectdelay>' >> /etc/ices2/ices-playlist.xml
echo ' <reconnectattempts>5</reconnectattempts> ' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <!-- maxqueuelength:' >> /etc/ices2/ices-playlist.xml
echo ' This describes how long the internal data queues may be. This' >> /etc/ices2/ices-playlist.xml
echo ' basically lets you control how much data gets buffered before' >> /etc/ices2/ices-playlist.xml
echo ' ices decides it cant send to the server fast enough, and ' >> /etc/ices2/ices-playlist.xml
echo ' either shuts down or flushes the queue (dropping the data)' >> /etc/ices2/ices-playlist.xml
echo ' and continues. ' >> /etc/ices2/ices-playlist.xml
echo ' For advanced users only.' >> /etc/ices2/ices-playlist.xml
echo ' -->' >> /etc/ices2/ices-playlist.xml
echo ' <maxqueuelength>80</maxqueuelength>' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' <!-- Live encoding/reencoding:' >> /etc/ices2/ices-playlist.xml
echo ' Currrently, the parameters given here for encoding MUST' >> /etc/ices2/ices-playlist.xml
echo ' match the input data for channels and sample rate. That ' >> /etc/ices2/ices-playlist.xml
echo ' restriction will be relaxed in the future.' >> /etc/ices2/ices-playlist.xml
echo ' Remove this section if you dont want your files getting reencoded.' >> /etc/ices2/ices-playlist.xml
echo ' -->' >> /etc/ices2/ices-playlist.xml
echo ' <encode> ' >> /etc/ices2/ices-playlist.xml
echo ' <nominal-bitrate>64000</nominal-bitrate>' >> /etc/ices2/ices-playlist.xml
echo ' <samplerate>22050</samplerate>' >> /etc/ices2/ices-playlist.xml
echo ' <channels>1</channels>' >> /etc/ices2/ices-playlist.xml
echo ' </encode>' >> /etc/ices2/ices-playlist.xml
echo ' </instance>' >> /etc/ices2/ices-playlist.xml
echo '' >> /etc/ices2/ices-playlist.xml
echo ' </stream>' >> /etc/ices2/ices-playlist.xml
echo '</ices>' >> /etc/ices2/ices-playlist.xml
sed -i 's|ENABLE=.*|ENABLE=true|g' /etc/default/icecast2
if [ ! -d $ICECAST_DIR ]; then
mkdir $ICECAST_DIR
fi
chown -R icecast2:icecast $ICECAST_DIR
# create a password for users
ICECAST_USER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
if grep -q "$MY_USERNAME:" /etc/nginx/.icepasswd; then
sed -i "/$MY_USERNAME:/d" /etc/nginx/.icepasswd
fi
echo "$ICECAST_USER_PASSWORD" | htpasswd -i -s -c /etc/nginx/.icepasswd $MY_USERNAME
if [ ! -f /etc/nginx/.icepasswd ]; then
echo $'/etc/nginx/.icepasswd not found'
exit 73528235
fi
${PROJECT_NAME}-pass -u $MY_USERNAME -a icecast -p "$ICECAST_PASSWORD"
${PROJECT_NAME}-pass -u $MY_USERNAME -a icecastuser -p "$ICECAST_USER_PASSWORD"
groupadd icecast
useradd -c "Icecast system account" -d /etc/icecast2 -m -r -g icecast icecast2
icecast_update_daemon
nginx_ensite icecast
systemctl restart nginx
icecast_rescan
start_icecast
APP_INSTALLED=1
}
function install_interactive_icecast {
install_icecast
}
# NOTE: deliberately no exit 0

View File

@ -175,7 +175,7 @@ function reconfigure_koel {
function koel_import_from_directory {
data=$(tempfile 2>/dev/null)
dialog --title "test" --dselect /home/$MY_USERNAME/ 30 60 2> $data
dialog --title "Choose a directory containing music" --dselect /home/$MY_USERNAME/ 30 60 2> $data
selected_dir=$(cat $data)
rm $data
if [[ "$selected_dir" == '/music' ]]; then

376
website/EN/app_icecast.html Normal file
View File

@ -0,0 +1,376 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-11-27 Mon 12:35 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Bob Mottram" />
<meta name="description" content="How to use Icecast"
/>
<meta name="keywords" content="freedombone, icecast" />
<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; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.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; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
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-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-hledger:before { content: 'hledger'; }
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'; }
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; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ 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" />
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<div id="preamble" class="status">
<a name="top" id="top"></a>
</div>
<div id="content">
<div class="org-center">
<div class="figure">
<p><img src="images/logo.png" alt="logo.png" />
</p>
</div>
</div>
<center>
<h1>Icecast</h1>
</center>
<p>
Icecast enables you to run something like an internet radio station. So if you have multiple audio files and want to be able to stream those in sequence from a web site then this can be useful.
</p>
<p>
This system is available only via an onion address, which should mitigate the potential for copyright disputes over streamed content. By default it's only set up to stream to a small number of users so that it doesn't put too much stress on CPU or memory requirements, although you can increase the maximum limit if you have a more powerful system and enough bandwidth.
</p>
<div id="outline-container-org9fecb99" class="outline-2">
<h2 id="org9fecb99">Installation</h2>
<div class="outline-text-2" id="text-org9fecb99">
<p>
Log into your system with:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh myusername@mydomain -p 2222
</pre>
</div>
<p>
Using cursor keys, space bar and Enter key select <b>Administrator controls</b> and type in your password.
</p>
<p>
Select <b>Add/Remove Apps</b>. If Vim is selected then you might want to unselect and uninstall it first, then select <b>icecast</b>.
</p>
<p>
If you then go to the <b>About</b> screen you'll see the onion address for Icecast and can navigate to it in a Tor compatible browser.
</p>
</div>
</div>
<div id="outline-container-orgf30a581" class="outline-2">
<h2 id="orgf30a581">Adding files to be streamed</h2>
<div class="outline-text-2" id="text-orgf30a581">
<p>
There are two ways to get files onto the system: either via ssh or via a USB drive. File types can be <b>ogg, ogv, mp3 or mp4</b> format.
</p>
<p>
It may take a while for the files to import, especially on a low power single board computer, since any mp3 or mp4 files will be converted to ogg or ogv. If you want to speed this up then you could do this conversion manually on a laptop with ffmpeg before storing files onto the USB drive or uploading them via ssh.
</p>
</div>
<div id="outline-container-org366fd74" class="outline-3">
<h3 id="org366fd74">From a USB drive</h3>
<div class="outline-text-3" id="text-org366fd74">
<p>
Create a directory on the USB drive named <b>icestream</b> and copy your files into there. Plug the drive into your server.
</p>
<p>
Go to the <b>Administrator control panel</b>, select <b>App settings</b>, then <b>icecast</b>, then <b>Import stream files from USB drive</b>.
</p>
</div>
</div>
<div id="outline-container-orgbb75a88" class="outline-3">
<h3 id="orgbb75a88">Via ssh</h3>
<div class="outline-text-3" id="text-orgbb75a88">
<p>
Make a directory named <b>icestream</b> and copy your files into it. Then copy the directory to your server.
</p>
<div class="org-src-container">
<pre class="src src-bash">scp -r -P 2222 icestream myusername@mydomain:/home/myusername
</pre>
</div>
<p>
Log into your server with:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh myusername@mydomain -p 2222
</pre>
</div>
<p>
Select <b>Administrator controls</b>, enter your password, then go to <b>App settings</b> followed by <b>icecast</b> and <b>Import stream files</b>. Choose the directory with up and down cursors and space bar to select.
</p>
</div>
</div>
</div>
<div id="outline-container-orgdc2e42f" class="outline-2">
<h2 id="orgdc2e42f">Access controls</h2>
<div class="outline-text-2" id="text-orgdc2e42f">
<p>
By default anyone who happens to find your Icecast onion address can listen to your stream. If you only want it to be available to a few friends or family then you can add an extra login password.
</p>
<p>
Go to the <b>Administrator control panel</b>, select <b>App settings</b>, then <b>icecast</b>, then <b>Enable login for stream users</b>. Take a note of the password and you can give that out to whoever needs access, preferably via an encrypted chat app or sneakernet. If you need to copy and paste then hold the shift key while highlighting the password.
</p>
</div>
</div>
</div>
<div id="postamble" class="status">
<style type="text/css">
.back-to-top {
position: fixed;
bottom: 2em;
right: 0px;
text-decoration: none;
color: #000000;
background-color: rgba(235, 235, 235, 0.80);
font-size: 12px;
padding: 1em;
display: none;
}
.back-to-top:hover {
background-color: rgba(135, 135, 135, 0.50);
}
</style>
<div class="back-to-top">
<a href="#top">Back to top</a> | <a href="mailto:bob@freedombone.net">E-mail me</a>
</div>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-11-08 Wed 14:34 -->
<!-- 2017-11-27 Mon 12:30 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
@ -264,9 +264,9 @@ The base install of the system just contains an email server and Mutt client, bu
</div>
</div>
<div id="outline-container-orge2d5b23" class="outline-2">
<h2 id="orge2d5b23">CryptPad</h2>
<div class="outline-text-2" id="text-orge2d5b23">
<div id="outline-container-org6976750" class="outline-2">
<h2 id="org6976750">CryptPad</h2>
<div class="outline-text-2" id="text-org6976750">
<p>
Collaborate on editing documents, presentations and source code, or vote on things. All with a good level of security.
</p>
@ -276,9 +276,9 @@ Collaborate on editing documents, presentations and source code, or vote on thin
</p>
</div>
</div>
<div id="outline-container-org535af0a" class="outline-2">
<h2 id="org535af0a">DLNA</h2>
<div class="outline-text-2" id="text-org535af0a">
<div id="outline-container-org034a81a" class="outline-2">
<h2 id="org034a81a">DLNA</h2>
<div class="outline-text-2" id="text-org034a81a">
<p>
Enables you to use the system as a music server which any DLNA compatible devices can connect to within your home network.
</p>
@ -288,9 +288,9 @@ Enables you to use the system as a music server which any DLNA compatible device
</p>
</div>
</div>
<div id="outline-container-org61623e3" class="outline-2">
<h2 id="org61623e3">Dokuwiki</h2>
<div class="outline-text-2" id="text-org61623e3">
<div id="outline-container-orgd4981e7" class="outline-2">
<h2 id="orgd4981e7">Dokuwiki</h2>
<div class="outline-text-2" id="text-orgd4981e7">
<p>
A databaseless wiki system.
</p>
@ -300,9 +300,9 @@ A databaseless wiki system.
</p>
</div>
</div>
<div id="outline-container-orge0257ac" class="outline-2">
<h2 id="orge0257ac">Emacs</h2>
<div class="outline-text-2" id="text-orge0257ac">
<div id="outline-container-org5c87cff" class="outline-2">
<h2 id="org5c87cff">Emacs</h2>
<div class="outline-text-2" id="text-org5c87cff">
<p>
If you use the Mutt client to read your email then this will set it up to use emacs for composing new mail.
</p>
@ -312,9 +312,9 @@ If you use the Mutt client to read your email then this will set it up to use em
</p>
</div>
</div>
<div id="outline-container-orgb24d6db" class="outline-2">
<h2 id="orgb24d6db">Etherpad</h2>
<div class="outline-text-2" id="text-orgb24d6db">
<div id="outline-container-org8f6c5e6" class="outline-2">
<h2 id="org8f6c5e6">Etherpad</h2>
<div class="outline-text-2" id="text-org8f6c5e6">
<p>
Collaborate on creating documents in real time. Maybe you're planning a holiday with other family members or creating documentation for a Free Software project along with other volunteers. Etherpad is hard to beat for simplicity and speed. Only users of the system will be able to access it.
</p>
@ -324,9 +324,9 @@ Collaborate on creating documents in real time. Maybe you're planning a holiday
</p>
</div>
</div>
<div id="outline-container-orgb3d24df" class="outline-2">
<h2 id="orgb3d24df">Friendica</h2>
<div class="outline-text-2" id="text-orgb3d24df">
<div id="outline-container-orgbda9945" class="outline-2">
<h2 id="orgbda9945">Friendica</h2>
<div class="outline-text-2" id="text-orgbda9945">
<p>
Federated social network system.
</p>
@ -336,9 +336,9 @@ Federated social network system.
</p>
</div>
</div>
<div id="outline-container-org80e709f" class="outline-2">
<h2 id="org80e709f">Ghost</h2>
<div class="outline-text-2" id="text-org80e709f">
<div id="outline-container-orgfe1de94" class="outline-2">
<h2 id="orgfe1de94">Ghost</h2>
<div class="outline-text-2" id="text-orgfe1de94">
<p>
Modern looking blogging system.
</p>
@ -348,9 +348,9 @@ Modern looking blogging system.
</p>
</div>
</div>
<div id="outline-container-orge6cfb69" class="outline-2">
<h2 id="orge6cfb69">GNU Social</h2>
<div class="outline-text-2" id="text-orge6cfb69">
<div id="outline-container-orgdd6af7e" class="outline-2">
<h2 id="orgdd6af7e">GNU Social</h2>
<div class="outline-text-2" id="text-orgdd6af7e">
<p>
Federated social network based on the OStatus protocol. You can "<i>remote follow</i>" other users within the GNU Social federation.
</p>
@ -360,9 +360,9 @@ Federated social network based on the OStatus protocol. You can "<i>remote follo
</p>
</div>
</div>
<div id="outline-container-org41197ed" class="outline-2">
<h2 id="org41197ed">Gogs</h2>
<div class="outline-text-2" id="text-org41197ed">
<div id="outline-container-org8f2e173" class="outline-2">
<h2 id="org8f2e173">Gogs</h2>
<div class="outline-text-2" id="text-org8f2e173">
<p>
Lightweight git project hosting system. You can mirror projects from Github, or if Github turns evil then just host your own projects while retaining the familiar <i>fork-and-pull</i> workflow. If you can use Github then you can also use Gogs.
</p>
@ -372,9 +372,9 @@ Lightweight git project hosting system. You can mirror projects from Github, or
</p>
</div>
</div>
<div id="outline-container-orgca785f7" class="outline-2">
<h2 id="orgca785f7">HTMLy</h2>
<div class="outline-text-2" id="text-orgca785f7">
<div id="outline-container-org8fd1e52" class="outline-2">
<h2 id="org8fd1e52">HTMLy</h2>
<div class="outline-text-2" id="text-org8fd1e52">
<p>
Databaseless blogging system. Quite simple and with a markdown-like format.
</p>
@ -384,9 +384,9 @@ Databaseless blogging system. Quite simple and with a markdown-like format.
</p>
</div>
</div>
<div id="outline-container-org86037c8" class="outline-2">
<h2 id="org86037c8">Hubzilla</h2>
<div class="outline-text-2" id="text-org86037c8">
<div id="outline-container-org70040fe" class="outline-2">
<h2 id="org70040fe">Hubzilla</h2>
<div class="outline-text-2" id="text-org70040fe">
<p>
Web publishing platform with social network like features and good privacy controls so that it's possible to specify who can see which content. Includes photo albums, calendar, wiki and file storage.
</p>
@ -396,9 +396,21 @@ Web publishing platform with social network like features and good privacy contr
</p>
</div>
</div>
<div id="outline-container-org8a61ba6" class="outline-2">
<h2 id="org8a61ba6">IRC Server (ngirc)</h2>
<div class="outline-text-2" id="text-org8a61ba6">
<div id="outline-container-org64ccd5e" class="outline-2">
<h2 id="org64ccd5e">Icecast media stream</h2>
<div class="outline-text-2" id="text-org64ccd5e">
<p>
Make your own internet radio station.
</p>
<p>
<a href="./app_icecast.html">How to use it</a>
</p>
</div>
</div>
<div id="outline-container-org73319d7" class="outline-2">
<h2 id="org73319d7">IRC Server (ngirc)</h2>
<div class="outline-text-2" id="text-org73319d7">
<p>
Run your own IRC chat channel which can be secured with a password and accessible via an onion address. A bouncer is included so that you can receive messages sent while you were offline. Works with Hexchat and other popular clients.
</p>
@ -408,18 +420,18 @@ Run your own IRC chat channel which can be secured with a password and accessibl
</p>
</div>
</div>
<div id="outline-container-org5fb058b" class="outline-2">
<h2 id="org5fb058b">Jitsi Meet</h2>
<div class="outline-text-2" id="text-org5fb058b">
<div id="outline-container-orgd03beb7" class="outline-2">
<h2 id="orgd03beb7">Jitsi Meet</h2>
<div class="outline-text-2" id="text-orgd03beb7">
<p>
Experimental WebRTC video conferencing system, similar to Google Hangouts. This may not be fully functional, but is hoped to be in the near future.
</p>
</div>
</div>
<div id="outline-container-org34dd27a" class="outline-2">
<h2 id="org34dd27a">KanBoard</h2>
<div class="outline-text-2" id="text-org34dd27a">
<div id="outline-container-org4b6a6a3" class="outline-2">
<h2 id="org4b6a6a3">KanBoard</h2>
<div class="outline-text-2" id="text-org4b6a6a3">
<p>
A simple kanban system for managing projects or TODO lists.
</p>
@ -429,9 +441,9 @@ A simple kanban system for managing projects or TODO lists.
</p>
</div>
</div>
<div id="outline-container-orgd752c61" class="outline-2">
<h2 id="orgd752c61">Key Server</h2>
<div class="outline-text-2" id="text-orgd752c61">
<div id="outline-container-orge157028" class="outline-2">
<h2 id="orge157028">Key Server</h2>
<div class="outline-text-2" id="text-orge157028">
<p>
An OpenPGP key server for storing and retrieving GPG public keys.
</p>
@ -441,9 +453,9 @@ An OpenPGP key server for storing and retrieving GPG public keys.
</p>
</div>
</div>
<div id="outline-container-orgd209174" class="outline-2">
<h2 id="orgd209174">Koel</h2>
<div class="outline-text-2" id="text-orgd209174">
<div id="outline-container-org090bd37" class="outline-2">
<h2 id="org090bd37">Koel</h2>
<div class="outline-text-2" id="text-org090bd37">
<p>
Access your music collection from any internet connected device.
</p>
@ -453,9 +465,9 @@ Access your music collection from any internet connected device.
</p>
</div>
</div>
<div id="outline-container-orgfa62348" class="outline-2">
<h2 id="orgfa62348">Lychee</h2>
<div class="outline-text-2" id="text-orgfa62348">
<div id="outline-container-org1c5934b" class="outline-2">
<h2 id="org1c5934b">Lychee</h2>
<div class="outline-text-2" id="text-org1c5934b">
<p>
Make your photo albums available on the web.
</p>
@ -465,9 +477,9 @@ Make your photo albums available on the web.
</p>
</div>
</div>
<div id="outline-container-org05fc470" class="outline-2">
<h2 id="org05fc470">Mailpile</h2>
<div class="outline-text-2" id="text-org05fc470">
<div id="outline-container-org3cf360f" class="outline-2">
<h2 id="org3cf360f">Mailpile</h2>
<div class="outline-text-2" id="text-org3cf360f">
<p>
Modern email client which supports GPG encryption.
</p>
@ -477,9 +489,9 @@ Modern email client which supports GPG encryption.
</p>
</div>
</div>
<div id="outline-container-orga3887ed" class="outline-2">
<h2 id="orga3887ed">Matrix</h2>
<div class="outline-text-2" id="text-orga3887ed">
<div id="outline-container-org62684b4" class="outline-2">
<h2 id="org62684b4">Matrix</h2>
<div class="outline-text-2" id="text-org62684b4">
<p>
Multi-user chat with some security and moderation controls.
</p>
@ -489,9 +501,9 @@ Multi-user chat with some security and moderation controls.
</p>
</div>
</div>
<div id="outline-container-org98a5590" class="outline-2">
<h2 id="org98a5590">Mediagoblin</h2>
<div class="outline-text-2" id="text-org98a5590">
<div id="outline-container-org67c8d9c" class="outline-2">
<h2 id="org67c8d9c">Mediagoblin</h2>
<div class="outline-text-2" id="text-org67c8d9c">
<p>
Publicly host video and audio files so that you don't need to use YouTube/Vimeo/etc.
</p>
@ -501,9 +513,9 @@ Publicly host video and audio files so that you don't need to use YouTube/Vimeo/
</p>
</div>
</div>
<div id="outline-container-orgf91b078" class="outline-2">
<h2 id="orgf91b078">Mumble</h2>
<div class="outline-text-2" id="text-orgf91b078">
<div id="outline-container-org35f9d59" class="outline-2">
<h2 id="org35f9d59">Mumble</h2>
<div class="outline-text-2" id="text-org35f9d59">
<p>
The popular VoIP and text chat system. Say goodbye to old-fashioned telephony conferences with silly dial codes. Also works well on mobile.
</p>
@ -513,9 +525,9 @@ The popular VoIP and text chat system. Say goodbye to old-fashioned telephony co
</p>
</div>
</div>
<div id="outline-container-orga31496f" class="outline-2">
<h2 id="orga31496f">NextCloud</h2>
<div class="outline-text-2" id="text-orga31496f">
<div id="outline-container-org4e83692" class="outline-2">
<h2 id="org4e83692">NextCloud</h2>
<div class="outline-text-2" id="text-org4e83692">
<p>
Store files on your server and sync them with laptops or mobile devices. Includes many plugins including videoconferencing and collaborative document editing.
</p>
@ -525,9 +537,9 @@ Store files on your server and sync them with laptops or mobile devices. Include
</p>
</div>
</div>
<div id="outline-container-org4565812" class="outline-2">
<h2 id="org4565812">PI-Hole</h2>
<div class="outline-text-2" id="text-org4565812">
<div id="outline-container-org38f233d" class="outline-2">
<h2 id="org38f233d">PI-Hole</h2>
<div class="outline-text-2" id="text-org38f233d">
<p>
The black hole for web adverts. Block adverts at the domain name level within your local network. It can significantly reduce bandwidth, speed up page load times and protect your systems from being tracked by spyware.
</p>
@ -537,9 +549,9 @@ The black hole for web adverts. Block adverts at the domain name level within yo
</p>
</div>
</div>
<div id="outline-container-orgdb572b6" class="outline-2">
<h2 id="orgdb572b6">Pleroma</h2>
<div class="outline-text-2" id="text-orgdb572b6">
<div id="outline-container-orgc0768d8" class="outline-2">
<h2 id="orgc0768d8">Pleroma</h2>
<div class="outline-text-2" id="text-orgc0768d8">
<p>
Pleroma is an OStatus-compatible social networking server, compatible with GNU Social, PostActiv and Mastodon. It is high-performance and so is especially well suited for running on low power single board computers without much RAM.
</p>
@ -549,9 +561,9 @@ Pleroma is an OStatus-compatible social networking server, compatible with GNU S
</p>
</div>
</div>
<div id="outline-container-org5d51ff5" class="outline-2">
<h2 id="org5d51ff5">PostActiv</h2>
<div class="outline-text-2" id="text-org5d51ff5">
<div id="outline-container-orgb849d85" class="outline-2">
<h2 id="orgb849d85">PostActiv</h2>
<div class="outline-text-2" id="text-orgb849d85">
<p>
An alternative federated social networking system compatible with GNU Social, Pleroma and Mastodon. It includes some optimisations and fixes currently not available within the main GNU Social project.
</p>
@ -561,9 +573,9 @@ An alternative federated social networking system compatible with GNU Social, Pl
</p>
</div>
</div>
<div id="outline-container-org6e223d1" class="outline-2">
<h2 id="org6e223d1">Profanity</h2>
<div class="outline-text-2" id="text-org6e223d1">
<div id="outline-container-org1eccd38" class="outline-2">
<h2 id="org1eccd38">Profanity</h2>
<div class="outline-text-2" id="text-org1eccd38">
<p>
A shell based XMPP client which you can run on the Freedombone server via ssh.
</p>
@ -573,9 +585,9 @@ A shell based XMPP client which you can run on the Freedombone server via ssh.
</p>
</div>
</div>
<div id="outline-container-orga15f077" class="outline-2">
<h2 id="orga15f077">Riot Web</h2>
<div class="outline-text-2" id="text-orga15f077">
<div id="outline-container-org7ba8023" class="outline-2">
<h2 id="org7ba8023">Riot Web</h2>
<div class="outline-text-2" id="text-org7ba8023">
<p>
A browser based user interface for the Matrix federated communications system, including WebRTC audio and video chat.
</p>
@ -585,9 +597,9 @@ A browser based user interface for the Matrix federated communications system, i
</p>
</div>
</div>
<div id="outline-container-org1d66f8e" class="outline-2">
<h2 id="org1d66f8e">SearX</h2>
<div class="outline-text-2" id="text-org1d66f8e">
<div id="outline-container-orge5ba7bf" class="outline-2">
<h2 id="orge5ba7bf">SearX</h2>
<div class="outline-text-2" id="text-orge5ba7bf">
<p>
A metasearch engine for customised and private web searches.
</p>
@ -597,9 +609,9 @@ A metasearch engine for customised and private web searches.
</p>
</div>
</div>
<div id="outline-container-org255b78b" class="outline-2">
<h2 id="org255b78b">tt-rss</h2>
<div class="outline-text-2" id="text-org255b78b">
<div id="outline-container-org1ddca20" class="outline-2">
<h2 id="org1ddca20">tt-rss</h2>
<div class="outline-text-2" id="text-org1ddca20">
<p>
Private RSS reader. Pulls in RSS/Atom feeds via Tor and is only accessible via an onion address. Have "<i>the right to read</i>" without the Surveillance State knowing what you're reading. Also available with a user interface suitable for viewing on mobile devices via a browser such as OrFox.
</p>
@ -609,9 +621,9 @@ Private RSS reader. Pulls in RSS/Atom feeds via Tor and is only accessible via a
</p>
</div>
</div>
<div id="outline-container-orgf2f850c" class="outline-2">
<h2 id="orgf2f850c">Syncthing</h2>
<div class="outline-text-2" id="text-orgf2f850c">
<div id="outline-container-org2602a28" class="outline-2">
<h2 id="org2602a28">Syncthing</h2>
<div class="outline-text-2" id="text-org2602a28">
<p>
Possibly the best way to synchronise files across all of your devices. Once it has been set up it "just works" with no user intervention needed.
</p>
@ -621,9 +633,9 @@ Possibly the best way to synchronise files across all of your devices. Once it h
</p>
</div>
</div>
<div id="outline-container-org05328a6" class="outline-2">
<h2 id="org05328a6">Tahoe-LAFS</h2>
<div class="outline-text-2" id="text-org05328a6">
<div id="outline-container-org80ed846" class="outline-2">
<h2 id="org80ed846">Tahoe-LAFS</h2>
<div class="outline-text-2" id="text-org80ed846">
<p>
Robust and encrypted storage of files on one or more server.
</p>
@ -633,9 +645,9 @@ Robust and encrypted storage of files on one or more server.
</p>
</div>
</div>
<div id="outline-container-orgf736869" class="outline-2">
<h2 id="orgf736869">Tox</h2>
<div class="outline-text-2" id="text-orgf736869">
<div id="outline-container-orgdc397e9" class="outline-2">
<h2 id="orgdc397e9">Tox</h2>
<div class="outline-text-2" id="text-orgdc397e9">
<p>
Client and bootstrap node for the Tox chat/VoIP system.
</p>
@ -645,9 +657,9 @@ Client and bootstrap node for the Tox chat/VoIP system.
</p>
</div>
</div>
<div id="outline-container-orga2e1cdb" class="outline-2">
<h2 id="orga2e1cdb">Turtl</h2>
<div class="outline-text-2" id="text-orga2e1cdb">
<div id="outline-container-org588d32f" class="outline-2">
<h2 id="org588d32f">Turtl</h2>
<div class="outline-text-2" id="text-org588d32f">
<p>
A system for privately creating and sharing notes and images, similar to Evernote but without the spying.
</p>
@ -657,18 +669,18 @@ A system for privately creating and sharing notes and images, similar to Evernot
</p>
</div>
</div>
<div id="outline-container-org0fd91b2" class="outline-2">
<h2 id="org0fd91b2">Vim</h2>
<div class="outline-text-2" id="text-org0fd91b2">
<div id="outline-container-org248d732" class="outline-2">
<h2 id="org248d732">Vim</h2>
<div class="outline-text-2" id="text-org248d732">
<p>
If you use the Mutt client to read your email then this will set it up to use vim for composing new mail.
</p>
</div>
</div>
<div id="outline-container-org378fc24" class="outline-2">
<h2 id="org378fc24">Virtual Private Network (VPN)</h2>
<div class="outline-text-2" id="text-org378fc24">
<div id="outline-container-org880e1f3" class="outline-2">
<h2 id="org880e1f3">Virtual Private Network (VPN)</h2>
<div class="outline-text-2" id="text-org880e1f3">
<p>
Set up a VPN on your server so that you can bypass local internet censorship.
</p>
@ -678,9 +690,9 @@ Set up a VPN on your server so that you can bypass local internet censorship.
</p>
</div>
</div>
<div id="outline-container-orgf7ad415" class="outline-2">
<h2 id="orgf7ad415">XMPP</h2>
<div class="outline-text-2" id="text-orgf7ad415">
<div id="outline-container-org3697e9f" class="outline-2">
<h2 id="org3697e9f">XMPP</h2>
<div class="outline-text-2" id="text-org3697e9f">
<p>
Chat server which can be used together with client such as Gajim or Conversations to provide end-to-end content security and also onion routed metadata security. Includes advanced features such as <i>client state notification</i> to save battery power on your mobile devices, support for seamless roaming between networks and <i>message carbons</i> so that you can receive the same messages while being simultaneously logged in to your account on more than one device.
</p>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-11-24 Fri 16:00 -->
<!-- 2017-11-24 Fri 18:14 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>