Deprecate Tor dongle. If it's needed it could be a separate project
This commit is contained in:
parent
012e2e89d6
commit
689317d22f
4
Makefile
4
Makefile
|
@ -12,7 +12,6 @@ install:
|
|||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
install -m 755 src/${APP} ${DESTDIR}${PREFIX}/bin
|
||||
install -m 755 src/${APP}-prep ${DESTDIR}${PREFIX}/bin
|
||||
install -m 755 src/${APP}-tordongle ${DESTDIR}${PREFIX}/bin
|
||||
install -m 755 src/${APP}-client ${DESTDIR}${PREFIX}/bin
|
||||
install -m 755 src/${APP}-remote ${DESTDIR}${PREFIX}/bin
|
||||
install -m 755 src/${APP}-config ${DESTDIR}${PREFIX}/bin
|
||||
|
@ -20,7 +19,6 @@ install:
|
|||
mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-prep.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-tordongle.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-client.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-remote.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-config.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
|
@ -28,7 +26,6 @@ install:
|
|||
uninstall:
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-prep.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-tordongle.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-client.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-remote.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-config.1.gz
|
||||
|
@ -36,7 +33,6 @@ uninstall:
|
|||
rm -rf ${PREFIX}/share/${APP}
|
||||
rm -f ${PREFIX}/bin/${APP}
|
||||
rm -f ${PREFIX}/bin/${APP}-prep
|
||||
rm -f ${PREFIX}/bin/${APP}-tordongle
|
||||
rm -f ${PREFIX}/bin/${APP}-client
|
||||
rm -f ${PREFIX}/bin/${APP}-remote
|
||||
rm -f ${PREFIX}/bin/${APP}-config
|
||||
|
|
|
@ -10,7 +10,6 @@ DIR=${APP}-${VERSION}
|
|||
sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone-prep
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone-tordongle
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone-client
|
||||
|
||||
# change the parent directory name to debian format
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
man/freedombone.1.gz
|
||||
man/freedombone-prep.1.gz
|
||||
man/freedombone-tordongle.1.gz
|
||||
man/freedombone-client.1.gz
|
||||
man/freedombone-remote.1.gz
|
||||
man/freedombone-config.1.gz
|
||||
|
|
Binary file not shown.
143
src/freedombone
143
src/freedombone
|
@ -52,7 +52,6 @@ VARIANT_MAILBOX="mailbox"
|
|||
VARIANT_NONMAILBOX="nonmailbox"
|
||||
VARIANT_SOCIAL="social"
|
||||
VARIANT_MEDIA="media"
|
||||
VARIANT_TOR_DONGLE="tordongle"
|
||||
|
||||
DEFAULT_DOMAIN_NAME=
|
||||
DEFAULT_DOMAIN_CODE=
|
||||
|
@ -397,7 +396,7 @@ function show_help {
|
|||
echo '------------'
|
||||
echo 'This can either be blank if you wish to install the full system,'
|
||||
echo "or for more specialised variants you can specify '$VARIANT_MAILBOX', '$VARIANT_CLOUD',"
|
||||
echo "'$VARIANT_CHAT', '$VARIANT_SOCIAL', '$VARIANT_MEDIA', '$VARIANT_TOR_DONGLE' or '$VARIANT_WRITER'."
|
||||
echo "'$VARIANT_CHAT', '$VARIANT_SOCIAL', '$VARIANT_MEDIA' or '$VARIANT_WRITER'."
|
||||
echo "If you wish to install everything except email then use the '$VARIANT_NONMAILBOX' variaint."
|
||||
echo ''
|
||||
exit 0
|
||||
|
@ -659,7 +658,7 @@ function parse_args {
|
|||
if [ ! $SYSTEM_TYPE ]; then
|
||||
SYSTEM_TYPE=$VARIANT_FULL
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE != $VARIANT_WRITER && $SYSTEM_TYPE != $VARIANT_CLOUD && $SYSTEM_TYPE != $VARIANT_CHAT && $SYSTEM_TYPE != $VARIANT_MAILBOX && $SYSTEM_TYPE != $VARIANT_NONMAILBOX && $SYSTEM_TYPE != $VARIANT_SOCIAL && $SYSTEM_TYPE != $VARIANT_MEDIA && $SYSTEM_TYPE != $VARIANT_TOR_DONGLE && $SYSTEM_TYPE != $VARIANT_FULL ]]; then
|
||||
if [[ $SYSTEM_TYPE != $VARIANT_WRITER && $SYSTEM_TYPE != $VARIANT_CLOUD && $SYSTEM_TYPE != $VARIANT_CHAT && $SYSTEM_TYPE != $VARIANT_MAILBOX && $SYSTEM_TYPE != $VARIANT_NONMAILBOX && $SYSTEM_TYPE != $VARIANT_SOCIAL && $SYSTEM_TYPE != $VARIANT_MEDIA && $SYSTEM_TYPE != $VARIANT_FULL ]]; then
|
||||
echo "'$SYSTEM_TYPE' is an unrecognised Freedombone variant."
|
||||
exit 30
|
||||
fi
|
||||
|
@ -3888,15 +3887,6 @@ function change_login_message {
|
|||
echo " ' ' -' --' - -' -' -'-' - " >> /etc/motd
|
||||
fi
|
||||
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
echo ' .---. .--. . ' >> /etc/motd
|
||||
echo ' | | : | ' >> /etc/motd
|
||||
echo ' | .-. .--. | | .-. .--. .-..| .-. ' >> /etc/motd
|
||||
echo " |( )| | ;( )| |( ||(.-' " >> /etc/motd
|
||||
echo " ' -' ' '--' -' ' - - | - --'" >> /etc/motd
|
||||
echo " ._.' " >> /etc/motd
|
||||
fi
|
||||
|
||||
echo '' >> /etc/motd
|
||||
echo ' Freedom in the Cloud' >> /etc/motd
|
||||
echo '' >> /etc/motd
|
||||
|
@ -3909,9 +3899,6 @@ function search_for_attached_usb_drive {
|
|||
if grep -Fxq "search_for_attached_usb_drive" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ -b $USB_DRIVE ]; then
|
||||
if [ ! -d $USB_MOUNT ]; then
|
||||
echo 'Mounting USB drive'
|
||||
|
@ -4585,7 +4572,7 @@ function save_firewall_settings {
|
|||
}
|
||||
|
||||
function configure_firewall_for_voip {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "configure_firewall_for_voip" $COMPLETION_FILE; then
|
||||
|
@ -4618,7 +4605,7 @@ function configure_firewall_for_dlna {
|
|||
# docker does its own firewalling
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" ]]; then
|
||||
return
|
||||
fi
|
||||
iptables -A INPUT -i eth0 -p udp --dport 1900 -j ACCEPT
|
||||
|
@ -4745,7 +4732,7 @@ function configure_firewall_for_git {
|
|||
}
|
||||
|
||||
function configure_firewall_for_email {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "configure_firewall_for_email" $COMPLETION_FILE; then
|
||||
|
@ -4828,7 +4815,7 @@ function script_to_make_self_signed_certificates {
|
|||
}
|
||||
|
||||
function configure_email {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "configure_email" $COMPLETION_FILE; then
|
||||
|
@ -4936,7 +4923,7 @@ function configure_email {
|
|||
}
|
||||
|
||||
function create_procmail {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "create_procmail" $COMPLETION_FILE; then
|
||||
|
@ -4953,7 +4940,7 @@ function create_procmail {
|
|||
|
||||
function spam_filtering {
|
||||
# NOTE: spamassassin installation currently doesn't work, sa-compile fails with a make error 23/09/2014
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "spam_filtering" $COMPLETION_FILE; then
|
||||
|
@ -5048,7 +5035,7 @@ function spam_filtering {
|
|||
}
|
||||
|
||||
function configure_imap {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "configure_imap" $COMPLETION_FILE; then
|
||||
|
@ -5187,7 +5174,7 @@ function encrypt_incoming_email {
|
|||
# encrypts incoming mail using your GPG public key
|
||||
# so even if an attacker gains access to the data at rest they still need
|
||||
# to know your GPG key password to be able to read anything
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "encrypt_incoming_email" $COMPLETION_FILE; then
|
||||
|
@ -5218,7 +5205,7 @@ function encrypt_outgoing_email {
|
|||
# encrypts outgoing mail using your GPG public key
|
||||
# so even if an attacker gains access to the data at rest they still need
|
||||
# to know your GPG key password to be able to read sent mail
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "encrypt_outgoing_email" $COMPLETION_FILE; then
|
||||
|
@ -5245,7 +5232,7 @@ function encrypt_outgoing_email {
|
|||
}
|
||||
|
||||
function encrypt_all_email {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "encrypt_all_email" $COMPLETION_FILE; then
|
||||
|
@ -5379,7 +5366,7 @@ function encrypt_all_email {
|
|||
}
|
||||
|
||||
function email_client {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "email_client" $COMPLETION_FILE; then
|
||||
|
@ -5491,7 +5478,7 @@ function email_client {
|
|||
}
|
||||
|
||||
function email_archiving {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "email_archiving" $COMPLETION_FILE; then
|
||||
|
@ -5523,7 +5510,7 @@ function email_archiving {
|
|||
}
|
||||
|
||||
function folders_for_mailing_lists {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "folders_for_mailing_lists" $COMPLETION_FILE; then
|
||||
|
@ -5601,7 +5588,7 @@ function email_from_address {
|
|||
}
|
||||
|
||||
function folders_for_email_addresses {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "folders_for_email_addresses" $COMPLETION_FILE; then
|
||||
|
@ -5654,7 +5641,7 @@ function folders_for_email_addresses {
|
|||
}
|
||||
|
||||
function create_public_mailing_list {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "create_public_mailing_list" $COMPLETION_FILE; then
|
||||
|
@ -5750,7 +5737,7 @@ function create_public_mailing_list {
|
|||
}
|
||||
|
||||
function create_private_mailing_list {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
# This installation doesn't work, results in ruby errors
|
||||
|
@ -5811,7 +5798,7 @@ function create_private_mailing_list {
|
|||
}
|
||||
|
||||
function import_email {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
|
||||
return
|
||||
fi
|
||||
EMAIL_COMPLETE_MSG=' *** Freedombone mailbox installation is complete ***'
|
||||
|
@ -5862,7 +5849,7 @@ function import_email {
|
|||
}
|
||||
|
||||
function install_web_server {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_web_server" $COMPLETION_FILE; then
|
||||
|
@ -6133,7 +6120,7 @@ function repair_databases_script {
|
|||
}
|
||||
|
||||
function install_owncloud_music_app {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_owncloud_music_app" $COMPLETION_FILE; then
|
||||
|
@ -6196,7 +6183,7 @@ function add_ddns_domain {
|
|||
}
|
||||
|
||||
function install_owncloud {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
OWNCLOUD_COMPLETION_MSG1=" *** Freedombone $SYSTEM_TYPE is now installed ***"
|
||||
|
@ -6447,7 +6434,7 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
}
|
||||
|
||||
function install_xmpp {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_xmpp" $COMPLETION_FILE; then
|
||||
|
@ -6572,7 +6559,7 @@ function install_watchdog_script {
|
|||
}
|
||||
|
||||
function install_irc_server {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_irc_server" $COMPLETION_FILE; then
|
||||
|
@ -6653,7 +6640,7 @@ function get_wiki_admin_password {
|
|||
}
|
||||
|
||||
function install_wiki {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_wiki" $COMPLETION_FILE; then
|
||||
|
@ -6941,7 +6928,7 @@ function get_blog_admin_password {
|
|||
}
|
||||
|
||||
function install_blog {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_blog" $COMPLETION_FILE; then
|
||||
|
@ -7183,7 +7170,7 @@ function install_gnu_social {
|
|||
if grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ! $MICROBLOG_DOMAIN_NAME ]; then
|
||||
|
@ -7426,7 +7413,7 @@ function install_redmatrix {
|
|||
if grep -Fxq "install_redmatrix" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ! $REDMATRIX_DOMAIN_NAME ]; then
|
||||
|
@ -7730,7 +7717,7 @@ function install_dlna_server {
|
|||
if grep -Fxq "install_dlna_server" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" ]]; then
|
||||
return
|
||||
fi
|
||||
apt-get -y install minidlna
|
||||
|
@ -7782,7 +7769,7 @@ function install_mediagoblin {
|
|||
if grep -Fxq "install_mediagoblin" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ! $MEDIAGOBLIN_DOMAIN_NAME ]; then
|
||||
|
@ -8060,79 +8047,12 @@ function intrusion_detection {
|
|||
echo 'intrusion_detection' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
# see http://adammelton.com/tor_dongle.php
|
||||
# Attach the BeagleBone to a PC via USB and then have an enthernet
|
||||
# connection to the internet router
|
||||
function create_tor_dongle {
|
||||
if grep -Fxq "create_tor_dongle" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE != "$VARIANT_TOR_DONGLE" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
apt-get -y install tor tor-arm
|
||||
|
||||
# firewall
|
||||
iptables -A INPUT -i usb0 -p tcp --dport 9050 -j ACCEPT
|
||||
iptables -A INPUT -i usb0 -p tcp --dport 9051 -j ACCEPT
|
||||
save_firewall_settings
|
||||
|
||||
# tor settings
|
||||
sed -i "s/#SocksPort 192.168.0.1:9100/SocksPort 192.168.7.2:9050/g" /etc/tor/torrc
|
||||
sed -i 's/#ControlPort 9051/ControlPort 9051/g' /etc/tor/torrc
|
||||
sed -i 's/#CookieAuthentication 1/CookieAuthentication 1/g' /etc/tor/torrc
|
||||
if ! grep -q "DisableDebuggerAttachment" /etc/tor/torrc; then
|
||||
echo 'DisableDebuggerAttachment 0' >> /etc/tor/torrc
|
||||
fi
|
||||
|
||||
# ensure that USB networking is enabled
|
||||
echo '# The loopback network interface' > /etc/network/interfaces
|
||||
echo 'auto lo' >> /etc/network/interfaces
|
||||
echo 'iface lo inet loopback' >> /etc/network/interfaces
|
||||
echo '' >> /etc/network/interfaces
|
||||
echo '# The primary network interface' >> /etc/network/interfaces
|
||||
echo 'auto eth0' >> /etc/network/interfaces
|
||||
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
|
||||
echo '' >> /etc/network/interfaces
|
||||
echo '# USB network interface' >> /etc/network/interfaces
|
||||
echo 'iface usb0 inet static' >> /etc/network/interfaces
|
||||
echo ' address 192.168.7.2' >> /etc/network/interfaces
|
||||
echo ' netmask 255.255.255.0' >> /etc/network/interfaces
|
||||
echo ' network 192.168.7.0' >> /etc/network/interfaces
|
||||
echo ' gateway 192.168.7.1' >> /etc/network/interfaces
|
||||
|
||||
if ! grep -q "Tor Dongle" /home/$MY_USERNAME/README; then
|
||||
echo '' >> /home/$MY_USERNAME/README
|
||||
echo '' >> /home/$MY_USERNAME/README
|
||||
echo 'Tor Dongle' >> /home/$MY_USERNAME/README
|
||||
echo '==========' >> /home/$MY_USERNAME/README
|
||||
echo 'Connect your PC to the Beaglebone via the USB cable' >> /home/$MY_USERNAME/README
|
||||
echo 'and the Beaglebone ethernet to your internet router.' >> /home/$MY_USERNAME/README
|
||||
echo '' >> /home/$MY_USERNAME/README
|
||||
echo 'Within your network proxy settings set the SOCKS host' >> /home/$MY_USERNAME/README
|
||||
echo 'to 192.168.7.2 and the port to 9050, with remote' >> /home/$MY_USERNAME/README
|
||||
echo 'DNS enabled. There should be no proxying for localhost' >> /home/$MY_USERNAME/README
|
||||
echo 'and 127.0.0.1' >> /home/$MY_USERNAME/README
|
||||
fi
|
||||
|
||||
echo 'Freedombone Tor Dongle installation is complete'
|
||||
cat /home/$MY_USERNAME/README
|
||||
|
||||
service networking restart
|
||||
service tor restart
|
||||
exit 873
|
||||
}
|
||||
|
||||
# see https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy
|
||||
# Local Redirection and Anonymizing Middlebox
|
||||
function route_outgoing_traffic_through_tor {
|
||||
if grep -Fxq "route_outgoing_traffic_through_tor" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ $ROUTE_THROUGH_TOR != "yes" ]]; then
|
||||
return
|
||||
fi
|
||||
|
@ -8484,7 +8404,7 @@ function get_voip_server_password {
|
|||
}
|
||||
|
||||
function install_voip {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_voip" $COMPLETION_FILE; then
|
||||
|
@ -8661,7 +8581,6 @@ create_backup_script
|
|||
create_restore_script
|
||||
backup_to_friends_servers
|
||||
restore_from_friend
|
||||
create_tor_dongle
|
||||
intrusion_detection
|
||||
install_final
|
||||
echo 'Freedombone installation is complete'
|
||||
|
|
|
@ -50,7 +50,6 @@ VARIANT_MAILBOX="mailbox"
|
|||
VARIANT_NONMAILBOX="nonmailbox"
|
||||
VARIANT_SOCIAL="social"
|
||||
VARIANT_MEDIA="media"
|
||||
VARIANT_TOR_DONGLE="tordongle"
|
||||
|
||||
MY_USERNAME=
|
||||
DEFAULT_DOMAIN_NAME=
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
#!/bin/bash
|
||||
# This script installs the Debian image to the microSD card, and should
|
||||
# be run on your laptop/desktop with the microSD card plugged in.
|
||||
|
||||
# License
|
||||
# =======
|
||||
#
|
||||
# Copyright (C) 2014-2015 Bob Mottram <bob@robotics.uk.to>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Version number of this script
|
||||
VERSION="1.00"
|
||||
|
||||
# typically /dev/sdb or /dev/sdc, depending upon how
|
||||
# many drives there are on your system
|
||||
MICROSD_DRIVE=$1
|
||||
|
||||
# IP address of the router (gateway)
|
||||
ROUTER_IP_ADDRESS="192.168.1.254"
|
||||
|
||||
# The fixed IP address of the Beaglebone Black on your local network
|
||||
BBB_FIXED_IP_ADDRESS="192.168.7.2"
|
||||
|
||||
MICROSD_MOUNT_POINT="/media/$USER"
|
||||
|
||||
DEBIAN_FILE_NAME="debian-jessie-console-armhf-2014-08-13"
|
||||
|
||||
# Downloads for the Debian installer
|
||||
DOWNLOAD_LINK1="https://rcn-ee.net/deb/rootfs/jessie/$DEBIAN_FILE_NAME.tar.xz"
|
||||
DOWNLOAD_LINK2="http://ynezz.ibawizard.net/beagleboard/jessie/$DEBIAN_FILE_NAME.tar.xz"
|
||||
|
||||
if [ ! MICROSD_DRIVE ]; then
|
||||
echo 'You need to specify a drive for the connected microSD.'
|
||||
echo 'This can most easily be found by removing the microSD, then'
|
||||
echo 'running:'
|
||||
echo ''
|
||||
echo ' ls /dev/sd*'
|
||||
echo ''
|
||||
echo 'Then plugging the microSD back in and entering the same command again'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
||||
echo "The microSD drive could not be found at ${MICROSD_DRIVE}1"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -d ~/freedombone ]; then
|
||||
mkdir ~/freedombone
|
||||
fi
|
||||
cd ~/freedombone
|
||||
if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME.tar.xz ]; then
|
||||
wget $DOWNLOAD_LINK1
|
||||
fi
|
||||
if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME.tar.xz ]; then
|
||||
# try another site
|
||||
wget $DOWNLOAD_LINK2
|
||||
if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME.tar.xz ]; then
|
||||
echo 'The Debian installer could not be downloaded'
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'Extracting files...'
|
||||
tar xJf $DEBIAN_FILE_NAME.tar.xz
|
||||
if [ ! -d ~/freedombone/$DEBIAN_FILE_NAME ]; then
|
||||
echo "Couldn't extract files"
|
||||
exit 4
|
||||
fi
|
||||
cd $DEBIAN_FILE_NAME
|
||||
sudo ./setup_sdcard.sh --mmc $MICROSD_DRIVE --dtb beaglebone
|
||||
|
||||
echo ''
|
||||
echo ''
|
||||
read -p "Eject the microSD card, re-insert it and wait a minute for it to mount, then press any key to continue... " -n1 -s
|
||||
|
||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
||||
echo ''
|
||||
echo "The microSD drive could not be found at ${MICROSD_DRIVE}1"
|
||||
read -p "Wait for the drive to mount then press any key... " -n1 -s
|
||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
||||
echo "microSD drive not found at ${MICROSD_DRIVE}1"
|
||||
exit 5
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo cp $MICROSD_MOUNT_POINT/BOOT/bbb-uEnv.txt $MICROSD_MOUNT_POINT/BOOT/uEnv.txt
|
||||
|
||||
sudo sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
|
||||
sudo sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
|
||||
|
||||
clear
|
||||
echo '*** Initial microSD card setup is complete ***'
|
||||
echo ''
|
||||
echo 'The microSD card can now be removed and inserted into the Beaglebone Black.'
|
||||
echo 'Once the Beaglebone has booted then you can log in with:'
|
||||
echo ''
|
||||
echo " ssh debian@$BBB_FIXED_IP_ADDRESS"
|
||||
echo ''
|
||||
echo 'The password is "temppwd". You can then become the root user by typing:'
|
||||
echo ''
|
||||
echo ' su'
|
||||
echo ''
|
||||
echo 'Using the password "root". Change the root user password by typing:'
|
||||
echo ''
|
||||
echo ' passwd'
|
||||
echo ''
|
||||
echo 'Then create a user for the system with:'
|
||||
echo ''
|
||||
echo ' adduser [username]'
|
||||
echo ''
|
||||
echo 'Enter the command "exit" a couple of times to get back to your main system'
|
||||
echo 'then log back in as the user you just created with:'
|
||||
echo ''
|
||||
echo ' ssh [username]@$BBB_FIXED_IP_ADDRESS'
|
||||
echo ''
|
||||
echo 'and use the "su" command to become the root user again. You can then load'
|
||||
echo 'the freedombone main installation script with:'
|
||||
echo ''
|
||||
echo ' apt-get -y install git'
|
||||
echo ' git clone https://github.com/bashrc/freedombone.git'
|
||||
echo ' cd freedombone'
|
||||
echo ''
|
||||
echo 'Finally you can use the freedombone command to setup the BBB as a dongle:'
|
||||
echo ''
|
||||
echo " freedombone --bbb -s tordongle -d [domain] -u [username] --ip $BBB_FIXED_IP_ADDRESS --iprouter $ROUTER_IP_ADDRESS"
|
||||
exit 0
|
Loading…
Reference in New Issue