-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·73 lines (60 loc) · 2.54 KB
/
install.sh
File metadata and controls
executable file
·73 lines (60 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#do manually first
# sudo git clone https://github.com/baileyji/M2FS-Control.git /M2FS-Control --recurse-submodules --branch ifum
#append coherent_pool=4M to command line in /boot/cmdline.txt consider also adding fsck.mode=force to always run fsck
#Set password
#passwd
#Update the system and install dependencies
sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
sudo systemctl restart systemd-journald
sudo apt update
sudo apt full-upgrade
sudo apt-get auto-remove
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt install python-scipy python-matplotlib nut python-flask zsh samba python-pip curl vim python-redis redis nodejs
sudo apt remove python-serial
#no to samba wins servers dhcp modification
#sudo pip install --upgrade pip
sudo pip install 'astropy<3' ##will get v 2
sudo pip install walrus pyyaml flask_wtf ipython pyserial==2.6 construct==2.0.6 pymodbus==1.5.2 bitstring==3.1.6 'quantities<0.13'
sudo npm install -g redis-commander --unsafe
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
#Install M2FS-Control
cd /
#sudo git clone https://github.com/baileyji/M2FS-Control.git /M2FS-Control --recurse-submodules --branch ifum
sudo chown -R pi /M2FS-Control
sudo pip install -e /M2FS-Control/jbastro
sudo pip install -e /M2FS-Control/hole_mapper
sudo pip install -e /M2FS-Control
#Set the login shell to zsh
cd /M2FS-Control
cp -v ./zshrc ~/.zshrc
chsh -s /bin/zsh
chmod a+w /M2FS-Control/redis
#Install M2FS system config files
sudo cp -v ./etc/ups/* /etc/nut/
sudo cp -v ./etc/hostname /etc/
sudo cp -v ./etc/hosts /etc/
sudo cp -v ./etc/dhcpcd.conf /etc/
sudo cp -v ./etc/udev/rules.d/* /etc/udev/rules.d/
sudo cp -v ./etc/systemd/system/* /etc/systemd/system/
sudo cp -v ./etc/systemd/timesyncd.conf /etc/systemd/
sudo cp -v ./etc/avahi/services/smb.service /etc/avahi/services/
sudo mv -v /etc/samba/smb.conf /etc/samba/smb.conf.stock
sudo cp -v ./etc/samba/smb.conf /etc/samba/
sudo cp -v ./etc/redis/redis.conf /etc/redis/redis.conf
sudo cp -v ./redis/redis-server.service /lib/systemd/system/
cp ./toprc ~/.config/procps/
#cp ./etc/ntp.conf /etc/
sudo udevadm control --reload-rules
sudo udevadm trigger
#Ensure systemd loads the new units
sudo systemctl daemon-reload
sudo systemctl enable m2fs_shutdown_button.service
sudo systemctl enable m2fs_targetlist.service
#Bring UPS monitoring online
sudo systemctl enable nut-server.service
#Enable and start the director
sudo systemctl enable m2fs_director.service
sudo systemctl reboot now