Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Upload
  • Loading branch information
NaysKutzu committed Nov 16, 2024
1 parent 31cd2b8 commit 2cdc83e
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 90 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.deb
/out/

# Created by https://www.gitignore.io/api/macos,python,windows,visualstudiocode
Expand Down
72 changes: 13 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# pve-fake-subscription
# MythicalPVE

![JavaScript free](https://img.shields.io/badge/JavaScript-free-%09%23f7df1e "No JavaScript is involved in this project. ")

Disables the "No valid subscription" dialog on all Proxmox products.

> I am really poor and I can't afford a license. I just want to get rid of the annoying dialog.
An legit way to activate proxmox!

## Features

Expand All @@ -20,15 +16,20 @@ Highlights:
- Future-proof: persists between system updates & major upgrades
- Hassle-free: you can uninstall at any time
- Comes with standard Debian package, easy to manage and automate
- **No JavaScript is involved** in the whole process, as I believe JavaScript is harmful to developers


## Usage

### Installation

1. [Download the latest release](https://github.com/Jamesits/pve-fake-subscription/releases/latest)
1. Install: run `dpkg -i pve-fake-subscription_*.deb` as root on every node
1. (Optional) `echo "127.0.0.1 shop.maurer-it.com" | sudo tee -a /etc/hosts` to prevent fake keys from being checked against the Proxmox servers
1. Download the package
```bash
curl -Lo mythical-pve.deb https://github.com/mythicalltd/mythicalpve/releases/latest/download/mythical-pve.deb
```
2. Install the package
```bash
dpkg -i mythical-pve.deb
```

Notes:

Expand All @@ -45,54 +46,7 @@ The fake subscription status doesn't grant you free access to the enterprise rep
Run as root:

```shell
apt purge pve-fake-subscription
```

This will revert your system to a "no subscription key" status.

## Development Notes

### Building the Package

Install [nFPM](https://nfpm.goreleaser.com/install/), then:

```shell
./package.sh
apt purge mythical-pve
```

### Compatibility Information for Old Proxmox VE Versions

#### PVE 4.x

After installation or updates, run:
```shell
sed -i'' -e's/pve8p/pve4p/g' /usr/bin/pve-fake-subscription
pve-fake-subscription
```

#### PVE 3.x

Installation with `dpkg -i` will not work because of missing dependencies. Use the following script to install manually:
```shell
# extract the deb package
mkdir -p /tmp/pve-fake-subscription
dpkg-deb -x pve-fake-subscription_*.deb /tmp/pve-fake-subscription

# patch and install the script
sed -i'' -e's/python3/python/g' -e's/pve8p/pve4p/g' /tmp/pve-fake-subscription/usr/bin/pve-fake-subscription
mv /tmp/pve-fake-subscription/usr/bin/pve-fake-subscription /usr/local/bin/

# install the timer
ln -sf /usr/local/bin/pve-fake-subscription /etc/cron.hourly/pve-fake-subscription

# invoke it once
/usr/local/bin/pve-fake-subscription

# remove temporary files
rm -rf /tmp/pve-fake-subscription
```

Removal:
```shell
rm -f /usr/local/bin/pve-fake-subscription /etc/cron.hourly/pve-fake-subscription /etc/subscription
```
This will revert your system to a "no subscription key" status.
Binary file added mythical-pve.deb
Binary file not shown.
20 changes: 10 additions & 10 deletions nfpm.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "pve-fake-subscription"
name: "mythical-pve"
arch: "all"
platform: "linux"
version: "0.0.11"
version: "1.0.0"
version_schema: "semver"
version_metadata: "git"

Expand All @@ -10,27 +10,27 @@ release: 1
section: "admin"
priority: "optional"

maintainer: "Nobody <nobody@example.com>"
maintainer: "NaysKutzu <abuse@mythicalsystems.xyz>"

depends:
- python3
description: |
Pollute the subscription cache of Proxmox VE (>=5.0), Proxmox Mail Gateway (>=5.0) & Proxmox Backup Server (>=1.0) so it won't alert you on dashboard login
An legit way to activate proxmox!
vendor: "none"
homepage: "https://github.com/Jamesits/pve-fake-subscription"
license: "GLWTS(Good Luck With That Shit) Public License"
homepage: "https://github.com/MythicalLTD/mythicalpve"
license: "GLWTS"

contents:
- src: "./usr/bin/pve-fake-subscription"
dst: "/usr/bin/pve-fake-subscription"
- src: "./usr/bin/mythical-pve"
dst: "/usr/bin/mythical-pve"
file_info:
mode: 0755
- src: "./usr/lib/systemd"
dst: "/usr/lib/systemd"
file_info:
mode: 0644
- src: "./usr/share/doc/pve-fake-subscription"
dst: "/usr/share/doc/pve-fake-subscription"
- src: "./usr/share/doc/mythical-pve"
dst: "/usr/share/doc/mythical-pve"
file_info:
mode: 0644

Expand Down
3 changes: 3 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ nfpm pkg --packager deb --target "${OUT_DIR}"
pushd "${OUT_DIR}" >/dev/null
sha256sum -b -- * > sha256sum.txt
popd >/dev/null

cp out/* out/..
mv mythical-pve*.deb mythical-pve.deb
20 changes: 10 additions & 10 deletions scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ after_upgrade() {
if command -v systemctl >/dev/null; then
systemctl --system daemon-reload >/dev/null || true
debsystemctl=$(command -v deb-systemd-invoke || echo systemctl)
if ! systemctl is-enabled pve-fake-subscription.timer >/dev/null
if ! systemctl is-enabled mythical-pve.timer >/dev/null
then
: # Ensure this if-clause is not empty. If it were empty, and we had an 'else', then it is an error in shell syntax
systemctl preset pve-fake-subscription.timer >/dev/null || true
$debsystemctl start pve-fake-subscription.timer >/dev/null || true
systemctl preset mythical-pve.timer >/dev/null || true
$debsystemctl start mythical-pve.timer >/dev/null || true
else
$debsystemctl restart pve-fake-subscription.timer >/dev/null || true
$debsystemctl restart mythical-pve.timer >/dev/null || true
fi
else
ln -sf /usr/bin/pve-fake-subscription /etc/cron.hourly/pve-fake-subscription
ln -sf /usr/bin/mythical-pve /etc/cron.hourly/mythical-pve
fi

pve-fake-subscription
mythical-pve
}

after_install() {
Expand All @@ -27,13 +27,13 @@ after_install() {
if command -v systemctl >/dev/null; then
systemctl --system daemon-reload >/dev/null || true
debsystemctl=$(command -v deb-systemd-invoke || echo systemctl)
systemctl preset pve-fake-subscription.timer >/dev/null || true
$debsystemctl start pve-fake-subscription.timer >/dev/null || true
systemctl preset mythical-pve.timer >/dev/null || true
$debsystemctl start mythical-pve.timer >/dev/null || true
else
ln -sf /usr/bin/pve-fake-subscription /etc/cron.hourly/pve-fake-subscription
ln -sf /usr/bin/mythical-pve /etc/cron.hourly/mythical-pve
fi

pve-fake-subscription
mythical-pve
}

if { [ "${1}" = "configure" ] && [ -z "${2}" ]; } || [ "${1}" = "abort-remove" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ after_remove() {
rm -f /etc/pmg/subscription
rm -f /etc/proxmox-backup/subscription

rm -f /etc/cron.hourly/pve-fake-subscription
rm -f /etc/cron.hourly/mythical-pve
}

after_purge() {
Expand Down
4 changes: 2 additions & 2 deletions scripts/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ before_remove() {
:

debsystemctl=$(command -v deb-systemd-invoke || echo systemctl)
$debsystemctl stop pve-fake-subscription.timer >/dev/null || true
systemctl disable pve-fake-subscription.timer >/dev/null || true
$debsystemctl stop mythical-pve.timer >/dev/null || true
systemctl disable mythical-pve.timer >/dev/null || true
systemctl --system daemon-reload >/dev/null || true
}

Expand Down
1 change: 1 addition & 0 deletions sha256sum.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4fc72b0deab5e6d88ce28896e354d691630c6e65e46f235d02d2eb36d6785ad3 *mythical-pve_1.0.0+git-1_all.deb
6 changes: 3 additions & 3 deletions usr/bin/pve-fake-subscription → usr/bin/mythical-pve
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ lic_pmg = "pmgp-1145141919"
lic_pbs = "pbst-1145141919"

# UI customization
ui_product_name = "YajuuSenpai"
ui_message = "Yajuu Senpai has got your back"
ui_url = "https://github.com/Jamesits/pve-fake-subscription"
ui_product_name = "MythicalSystems"
ui_message = "License Server Provided by MythicalSystems!"
ui_url = "https://mythical.systems"

def get_timestamp():
return int(time.time())
Expand Down
1 change: 1 addition & 0 deletions usr/lib/systemd/system-preset/mythical-pve.preset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable mythical-pve.timer
1 change: 0 additions & 1 deletion usr/lib/systemd/system-preset/pve-fake-subscription.preset

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Description=Fake a Proxmox VE subscription

[Service]
Type=oneshot
ExecStart=/usr/bin/pve-fake-subscription
ExecStart=/usr/bin/mythical-pve
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pve-fake-subscription
Source: https://github.com/Jamesits/pve-fake-subscription
Upstream-Name: mythical-pve
Source: https://github.com/Jamesits/mythical-pve

Files: *
Copyright: 2019 Nobody
Expand Down

0 comments on commit 2cdc83e

Please sign in to comment.