-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·45 lines (33 loc) · 1.26 KB
/
install.sh
File metadata and controls
executable file
·45 lines (33 loc) · 1.26 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
#!/bin/bash
mkdir -p /etc/wsn
# CO2 logger service
echo "Installing K30 logging service executable..."
cp scripts/k30-logger.py /usr/sbin/k30-logger
chmod +x /usr/sbin/k30-logger
cp etc/wsn/k30-logger.conf /etc/wsn/
echo "Registering K30 logging service..."
cp etc/systemd/system/k30-logger.service /etc/systemd/system/
echo "Enabling K30 logging service start at boot..."
systemctl enable k30-logger.service
# pressure-logger
echo "Installing BMP180 logging service executable..."
cp scripts/bmp180-logger.py /usr/sbin/bmp180-logger
chmod +x /usr/sbin/bmp180-logger
cp etc/wsn/bmp180-logger.conf /etc/wsn/
echo "Registering BMP180 logging service..."
cp etc/systemd/system/bmp180-logger.service /etc/systemd/system/
echo "Enabling BMP180 logging service start at boot..."
systemctl enable bmp180-logger.service
if [ ! -f /etc/samba/smb.conf.bak ]; then
echo "Backing up existing samba configuration file..."
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
fi
echo "Installing samba configuration..."
cp etc/samba/smb.conf /etc/samba/
systemctl daemon-reload
echo "Starting K30 logging service..."
systemctl restart k30-logger.service
echo "Starting BMP180 logging service..."
systemctl restart bmp180-logger.service
echo "Starting samba service..."
systemctl restart smbd