Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
0f7bad4a
Commit
0f7bad4a
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Beginning of usb client
parent
4f4354ba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-client
+4
-1
4 additions, 1 deletion
src/freedombone-client
src/freedombone-image-customise
+77
-0
77 additions, 0 deletions
src/freedombone-image-customise
with
81 additions
and
1 deletion
src/freedombone-client
+
4
−
1
View file @
0f7bad4a
...
...
@@ -192,8 +192,11 @@ configure_monkeysphere
if
[[
$MESH_CLIENT_INSTALL
==
$'yes'
||
$MESH_CLIENT_INSTALL
==
$'y'
||
$MESH_CLIENT_INSTALL
==
$'on'
]]
;
then
echo
$'Installing mesh packages'
sudo
apt-get
-y
install
avahi-utils avahi-autoipd avahi-dnsconfd
${
PROJECT_NAME
}
-mesh-install
-f
toxic
sudo
${
PROJECT_NAME
}
-mesh-install
-f
tox_node
sudo
${
PROJECT_NAME
}
-mesh-install
-f
toxic
${
PROJECT_NAME
}
-mesh-install
-f
qtox
sudo
${
PROJECT_NAME
}
-mesh-install
-f
zeronet
${
PROJECT_NAME
}
-mesh-install
-f
batman_client
fi
echo
$'Configuration complete'
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-image-customise
+
77
−
0
View file @
0f7bad4a
...
...
@@ -994,15 +994,92 @@ initialise_mesh() {
# User interface for USB drive installs ######################################
function
enable_tox_repo
{
chroot
"
$rootdir
"
echo
'deb http://download.opensuse.org/repositories/home:/antonbatenev:/tox/Debian_8.0/ /'
>
/etc/apt/sources.list.d/tox.list
chroot
"
$rootdir
"
wget http://download.opensuse.org/repositories/home:antonbatenev:tox/Debian_8.0/Release.key
chroot
"
$rootdir
"
apt-key add - < Release.key
chroot
"
$rootdir
"
apt-get update
echo
"Tox Repository Installed."
}
function
install_syncthing
{
if
[[
$SYSTEM_TYPE
==
"
$VARIANT_WRITER
"
||
$SYSTEM_TYPE
==
"
$VARIANT_MAILBOX
"
||
$SYSTEM_TYPE
==
"
$VARIANT_CHAT
"
||
$SYSTEM_TYPE
==
"
$VARIANT_SOCIAL
"
||
$SYSTEM_TYPE
==
"
$VARIANT_MEDIA
"
||
$SYSTEM_TYPE
==
"
$VARIANT_DEVELOPER
"
]]
;
then
return
fi
chroot
"
$rootdir
"
apt-get
-y
install
curl
chroot
"
$rootdir
"
curl
-s
https://syncthing.net/release-key.txt | apt-key add -
chroot
"
$rootdir
"
echo
"deb http://apt.syncthing.net/ syncthing release"
|
tee
/etc/apt/sources.list.d/syncthing.list
chroot
"
$rootdir
"
apt-get update
chroot
"
$rootdir
"
apt-get
-y
install
syncthing
# This probably does need to run as root so that it can access the Sync directories
# in each user's home directory
chroot
"
$rootdir
"
echo
'[Unit]'
>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'Description=Syncthing - Open Source Continuous File Synchronization'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'Documentation=man:syncthing(1)'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'After=network.target'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'Wants=syncthing-inotify@.service'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
''
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'[Service]'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'User=root'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
"Environment='all_proxy=socks5://localhost:9050'"
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'Restart=on-failure'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'SuccessExitStatus=3 4'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'RestartForceExitStatus=3 4'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
''
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'[Install]'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
echo
'WantedBy=multi-user.target'
>>
/etc/systemd/system/syncthing.service
chroot
"
$rootdir
"
systemctl
enable
syncthing
chroot
"
$rootdir
"
systemctl daemon-reload
if
!
grep
-q
"syncthing"
$rootdir
/etc/crontab
;
then
chroot
"
$rootdir
"
echo
"*/1 * * * * root /usr/local/bin/freedombone-syncthing > /dev/null"
>>
/etc/crontab
chroot
"
$rootdir
"
systemctl restart cron
fi
echo
'install_syncthing'
}
function
configure_user_interface
{
if
[[
$VARIANT
!=
"meshclient"
&&
$VARIANT
!=
"usb"
]]
;
then
return
fi
# desktop
chroot
"
$rootdir
"
apt-get
-y
install
mate-desktop-environment
# browser
chroot
"
$rootdir
"
apt-get
-y
install
iceweasel
# Tox user interface
enable_tox_repo
chroot
"
$rootdir
"
apt-get
-y
install
qtox
# Syncthing
install_syncthing
if
[[
$VARIANT
==
"usb"
]]
;
then
# tor
chroot
"
$rootdir
"
apt-get
-y
install
tor
# xmpp client
chroot
"
$rootdir
"
echo
"deb ftp://ftp.gajim.org/debian unstable main"
>
/etc/apt/sources.list.d/gajim.list
chroot
"
$rootdir
"
apt-get update
chroot
"
$rootdir
"
apt-get
-y
install
gajim-dev-keyring
chroot
"
$rootdir
"
apt-get
-y
install
git python-dev python-pip gajim-nightly
chroot
"
$rootdir
"
mkdir
/home/
$GENERIC_IMAGE_USERNAME
/.local/share/gajim/plugins
-p
chroot
"
$rootdir
"
git clone https://github.com/omemo/gajim-omemo /home/
$GENERIC_IMAGE_USERNAME
/.local/share/gajim/plugins/gajim-omemo
chroot
"
$rootdir
"
pip
install
protobuf
==
2.6.1, python-axolotl
==
0.1.35
chroot
"
$rootdir
"
chown
-R
$GENERIC_IMAGE_USERNAME
:
$GENERIC_IMAGE_USERNAME
/home/
$GENERIC_IMAGE_USERNAME
/.local
# IRC client
chroot
"
$rootdir
"
apt-get
-y
install
hexchat profanity
# zeronet
# TODO
fi
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment