mirror of
https://github.com/Jamesits/pve-fake-subscription
synced 2024-08-30 16:52:18 +00:00
some progress for PBS
This commit is contained in:
parent
c57e470557
commit
d75f6d908d
@ -11,7 +11,8 @@ import sys
|
|||||||
import os
|
import os
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
# /usr/share/perl5/PVE/Subscription.pm
|
# PVE & PMG: /usr/share/perl5/PVE/Subscription.pm
|
||||||
|
# PBS: /usr/lib/x86_64-linux-gnu/proxmox-backup/*
|
||||||
shared_key_data = "kjfdlskfhiuewhfk947368"
|
shared_key_data = "kjfdlskfhiuewhfk947368"
|
||||||
server_key_file = "/etc/ssh/ssh_host_rsa_key.pub"
|
server_key_file = "/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
|
|
||||||
@ -28,7 +29,7 @@ def generate_server_id(key: str) -> str:
|
|||||||
def generate_subscription(key: str, server_ids: List[str]) -> str:
|
def generate_subscription(key: str, server_ids: List[str]) -> str:
|
||||||
localinfo = {
|
localinfo = {
|
||||||
"checktime": get_timestamp(),
|
"checktime": get_timestamp(),
|
||||||
"status": "Active",
|
"status": "Active", # PBS: `new`, `notfound`, `active`, `invalid`
|
||||||
"key": key,
|
"key": key,
|
||||||
"validdirectory": ",".join(server_ids),
|
"validdirectory": ",".join(server_ids),
|
||||||
"productname": "YajuuSenpai",
|
"productname": "YajuuSenpai",
|
||||||
@ -72,3 +73,8 @@ if __name__ == "__main__":
|
|||||||
if os.path.exists("/etc/pmg"):
|
if os.path.exists("/etc/pmg"):
|
||||||
print("Activating Proxmox Mail Gateway...")
|
print("Activating Proxmox Mail Gateway...")
|
||||||
activate("pmgp-1145141919", r'pmg([cbsp])-[0-9a-f]{10}', "/etc/pmg/subscription")
|
activate("pmgp-1145141919", r'pmg([cbsp])-[0-9a-f]{10}', "/etc/pmg/subscription")
|
||||||
|
|
||||||
|
# Proxmox Backup Server (not working yet)
|
||||||
|
if os.path.exists("/etc/proxmox-backup"):
|
||||||
|
print("Activating Proxmox Backup Server...")
|
||||||
|
activate("pmgp-1145141919", r'pmg([cbsp])-[0-9a-f]{10}', "/etc/proxmox-backup/subscription")
|
||||||
|
Loading…
Reference in New Issue
Block a user