mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 10:44:52 +01:00
build
This commit is contained in:
@@ -8,6 +8,7 @@ to manage endpoints, stacks, and containers.
|
|||||||
# !/myapps/venvs/portainer/bin/python3
|
# !/myapps/venvs/portainer/bin/python3
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import argparse
|
import argparse
|
||||||
@@ -253,6 +254,12 @@ print(cur_config)
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Example usage: set PORTAINER_USER and PORTAINER_PASS in env, or pass literals below.
|
# Example usage: set PORTAINER_USER and PORTAINER_PASS in env, or pass literals below.
|
||||||
# token = get_portainer_token(base,"admin","l4c1j4yd33Du5lo") # or get_portainer_token(base, "admin", "secret")
|
# token = get_portainer_token(base,"admin","l4c1j4yd33Du5lo") # or get_portainer_token(base, "admin", "secret")
|
||||||
|
def signal_handler(sig, frame):
|
||||||
|
logger.warning("Killed manually %s, %s", sig, frame)
|
||||||
|
print("\nTerminated by user")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
signal.signal(signal.SIGINT, signal_handler)
|
||||||
os.system("cls" if os.name == "nt" else "clear")
|
os.system("cls" if os.name == "nt" else "clear")
|
||||||
if args.action is None:
|
if args.action is None:
|
||||||
actions = [
|
actions = [
|
||||||
|
|||||||
Reference in New Issue
Block a user