15 lines
340 B
Python
15 lines
340 B
Python
# Author: Stefan Weijers https://github.com/Stxfie
|
|
|
|
import os
|
|
from config import bcolors,env
|
|
|
|
time = os.popen('uptime -p').read() # Execute command on system
|
|
|
|
time = time.replace('up', '')
|
|
time = time.strip()
|
|
|
|
print(bcolors.EMPTY + env.name + bcolors.RESET)
|
|
print('Server has been up for: [' + bcolors.EMPTY + time + bcolors.RESET + ']')
|
|
|
|
|