-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·47 lines (37 loc) · 1.12 KB
/
install.sh
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
#!/bin/bash
#Set the login shell to bash
chsh -s /bin/bash
#Install M2FS system config files
cp -rv ./etc/* /etc/
cp -v ./bashrc /home/root/.bashrc
cp -v ./bashrc /home/root/.bash_login
cp -v ./vimrc /home/root/.vimrc
#Ensure systemd loads the new units
systemctl daemon-reload
#Bring ethernet online
systemctl enable ethernet_hack.service
systemctl start ethernet_hack.service
#Bring UPS monitoring online
mkdir -p /var/state/ups
chmod 0770 /var/state/ups
groupadd nut
chown root:nut /var/state/ups
systemctl enable nut-server.service
systemctl start nut-server.service
systemctl enable nut-monitor.service
systemctl start nut-monitor.service
#Get ntp installed
opkg install coreutils
opkg install ntp
cp ./etc/ntp.conf /etc/
#Get pip
easy_install pip
#install ipython and needed python packages
pip install pyserial==2.6
pip install construct==2.0.6
pip install ipython
#useradd -m -p $(perl -e 'print crypt($ARGV[0], "password")' "m2fsuser") m2fsuser
#useradd -m -p $(perl -e 'print crypt($ARGV[0], "password")' "m2fsadmin") m2fsadmin
#Enable and start the director
systemctl enable director.service
systemctl start director.service