""" libremanage - Lightweight, free software for remote side-chanel server management Copyright (C) 2018 Alyssa Rosenzweig This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . """ import sys USAGE = """ Usage: $ libremanage [server name] [command] Example: $ libremanage web2 reboot Server names are defined in the accompanying config.py. Valid commands are as follows: - shutdown, reboot, poweron: Power management """ if len(sys.argv) != 3: print("Incorrect number of arguments") print(USAGE) sys.exit(1) def issue_command(server_name, command): print(server_name, command) issue_command(sys.argv[1], sys.argv[2])