-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmanifetch.py
More file actions
executable file
·25 lines (20 loc) · 906 Bytes
/
manifetch.py
File metadata and controls
executable file
·25 lines (20 loc) · 906 Bytes
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
#!/usr/bin/env python
#########################################################################
# #
# manifetch.py securely copies the manifest from the master #
# server to the client #
# #
#########################################################################
import os
# Get the master server address from the HOSTS config file
with open("quesoFiesta.sh", "r") as hostfile:
# Extract the config info stored at the head of quesoFiesta.sh
HOST = hostfile.readlines()
# Parse the list for the server information
SERVER = HOST[2].split("=")
SERVER = SERVER[1].strip()
# Parse the list for the user information
USER = HOST[3].split("=")
USER = USER[1].strip()
# Securely copy the manifest from the master server to the /data/temp directory on the raspberry pi client
os.system("scp " + USER + "@" + SERVER + ":/data/PackRat/manifest.txt /data/PackRat/temp/manifest.txt")