30 lines
580 B
Python
30 lines
580 B
Python
#!/usr/bin/python3
|
|
from subprocess import check_output, run
|
|
from time import sleep
|
|
import datetime
|
|
from datetime import datetime
|
|
|
|
|
|
def get_time():
|
|
ts1 = str(datetime.now()).split('.')[0]
|
|
return ts1
|
|
|
|
mountpoints = [
|
|
'/mnt/main_bridge',
|
|
'/mnt/engineering',
|
|
'/mnt/shuttlebay'
|
|
]
|
|
|
|
def main():
|
|
timestamp = get_time()
|
|
print(f'Start time: {timestamp}')
|
|
for mountpoint in mountpoints:
|
|
run(['umount',mountpoint])
|
|
run(['mount',mountpoint])
|
|
timestamp = get_time()
|
|
print(f'End time: {timestamp}')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|