mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* cifs for cloud backups on lan * password spelling fix * fix spelling and fix rpc method * fix other methods * remove old code and rename method * add support for cifs backup targets wip cifs api simplify idiom add doc comment wip wip should work™ * add password hash to server info * fix type * fix types for cifs * minor fixes for cifs feature * fix rpc structure * fix copy, address some TODOs * add subcommand * backup path and navigation * wizard edits * rebased success page * wiz conflicts resolved * current change actually * only unsub if done * no fileter if necessary * fix copy for cifs old password * setup complete (#913) * setup complete * minor fixes * setup.complete * complete bool * setup-wizard: complete boolean Co-authored-by: Matt Hill <matthewonthemoon@gmail.com> Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com> Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
56 lines
1.9 KiB
Bash
Executable File
56 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Update repositories, install dependencies, do some initial configurations, set hostname, enable embassy-init, and config Tor
|
|
set -e
|
|
|
|
! test -f /etc/docker/daemon.json || rm /etc/docker/daemon.json
|
|
|
|
apt update
|
|
apt install -y \
|
|
docker.io \
|
|
tor \
|
|
nginx \
|
|
libavahi-client3 \
|
|
avahi-daemon \
|
|
iotop \
|
|
bmon \
|
|
exfat-utils \
|
|
sqlite3 \
|
|
wireless-tools \
|
|
net-tools \
|
|
ecryptfs-utils \
|
|
cifs-utils \
|
|
samba-common-bin
|
|
sed -i 's/"1"/"0"/g' /etc/apt/apt.conf.d/20auto-upgrades
|
|
sed -i 's/Restart=on-failure/Restart=always/g' /lib/systemd/system/tor@default.service
|
|
sed -i '/}/i \ \ \ \ application\/wasm \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wasm;' /etc/nginx/mime.types
|
|
sed -i 's/# server_names_hash_bucket_size 64;/server_names_hash_bucket_size 128;/g' /etc/nginx/nginx.conf
|
|
sed -i 's/ExecStart=\/sbin\/wpa_supplicant -u -s -O \/run\/wpa_supplicant/ExecStart=\/sbin\/wpa_supplicant -u -s -O \/run\/wpa_supplicant -c \/etc\/wpa_supplicant.conf -i wlan0/g' /lib/systemd/system/wpa_supplicant.service
|
|
sed -i 's/#allow-interfaces=eth0/allow-interfaces=eth0,wlan0/g' /etc/avahi/avahi-daemon.conf
|
|
echo "auto wlan0" > /etc/network/interfaces
|
|
echo "iface wlan0 inet dhcp" >> /etc/network/interfaces
|
|
mkdir -p /etc/nginx/ssl
|
|
|
|
# fix to suppress docker warning, fixed in 21.xx release of docker cli: https://github.com/docker/cli/pull/2934
|
|
mkdir -p /root/.docker
|
|
touch /root/.docker/config.json
|
|
|
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
|
docker network create -d bridge --subnet 172.18.0.1/16 start9 || true
|
|
mkdir -p /etc/embassy
|
|
hostnamectl set-hostname "embassy"
|
|
systemctl enable embassyd.service embassy-init.service
|
|
cat << EOF > /etc/tor/torrc
|
|
SocksPort 0.0.0.0:9050
|
|
SocksPolicy accept 127.0.0.1
|
|
SocksPolicy accept 172.18.0.0/16
|
|
SocksPolicy reject *
|
|
ControlPort 9051
|
|
CookieAuthentication 1
|
|
EOF
|
|
|
|
echo 'overlayroot="tmpfs":swap=1,recurse=0' > /etc/overlayroot.local.conf
|
|
systemctl disable initialization.service
|
|
sync
|
|
reboot
|