2016-01-22 15:44:38 +01:00
|
|
|
import xmlrpclib
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
daemon = xmlrpclib.ServerProxy("http://localhost:7080/")
|
|
|
|
try:
|
2016-02-25 23:17:07 +01:00
|
|
|
status = daemon.is_running()
|
2016-01-22 15:44:38 +01:00
|
|
|
except:
|
2016-02-25 23:17:07 +01:00
|
|
|
status = False
|
2016-01-22 15:44:38 +01:00
|
|
|
|
2016-02-25 23:17:07 +01:00
|
|
|
if status:
|
2016-02-11 14:32:48 +01:00
|
|
|
daemon.stop()
|
|
|
|
print "LBRYnet daemon stopped"
|
2016-01-22 15:44:38 +01:00
|
|
|
else:
|
|
|
|
print "LBRYnet daemon wasn't running"
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|