Skip to content

Commit 1eb3372

Browse files
committed
feat: initial upload
1 parent 9b34344 commit 1eb3372

15 files changed

Lines changed: 517 additions & 377 deletions

File tree

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2026 wandercone
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
19+
OR OTHER DEALINGS IN THE SOFTWARE.

LICENSE-unraid-plugin-template

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 21 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,34 @@
1-
# Unraid Plugin Template
1+
# Unraid-Sidegrade
22

3-
A simple template to help you create your own Unraid plugin, even if you're new to development.
3+
An unofficial Unraid OS updater. Paste a download URL, verify the checksum, reboot. Bypasses the official update flow and installs any OS version directly to the boot device.
44

5-
## What You'll Need
5+
## Features
66

7-
📝 **Requirements:**
7+
- Install any Unraid OS version from a direct download URL
8+
- MD5 checksum verification before touching the boot device
9+
- Automatic backup of current boot files to `/boot/previous`
810

9-
- A GitHub account
10-
- Basic understanding of Unraid
11-
- Text editor (VS Code is recommended for beginners)
12-
- Your Unraid server for testing
11+
## Requirements
1312

14-
---
13+
- Unraid 7.0.0 or later
1514

16-
## Getting Started
15+
## Installation
1716

18-
### 📁 Step 1: Create Your Plugin Repository
17+
**Via Plugin URL**
1918

20-
1. Click the green "Use this template" button at the top of this page
21-
2. Give your new repository a name (this will be your plugin's name)
22-
3. Make it public so others can use your plugin
23-
4. Click "Create repository from template"
19+
1. In the Unraid UI go to **Plugins > Install Plugin**
20+
2. Paste the `.plg` URL from the [latest release](https://raw.githubusercontent.com/wandercone/Updater/refs/heads/main/plugin/updater.plg)
21+
3. Click **Install**
2422

25-
### ✏️ Step 2: Customize Your Plugin
23+
After installation the plugin is available at **System Information > Unraid Updater**.
2624

27-
2. Customize the template:
28-
- **Option A: Automated**
29-
- Run the `customize.sh` script to download and run the customization tool:
30-
```sh
31-
./customize.sh
32-
```
33-
- **Option B: Manual**
34-
- Follow the customization guide below to customize the template files yourself.
25+
## Usage
3526

36-
### ⚙️ Step 3: Enable GitHub Actions
27+
1. Visit the [Unraid version history](https://docs.unraid.net/unraid-os/download_list/) and copy the download URL and MD5 checksum for the version you want
28+
2. Paste the URL and checksum into the plugin
29+
3. Click Download & Install
30+
4. Reboot
3731

38-
In your GitHub repository settings, make sure "Actions" are enabled. This is **required** for the release workflow to automatically build your plugin packages when you create releases. Without this, users won't be able to install your plugin.
32+
## How It Works
3933

40-
### 🚀 Step 4: Test and Release
41-
42-
Once you've made your changes, you can test your plugin and release it for others to use.
43-
44-
---
45-
46-
## Publishing Your Plugin
47-
48-
📦 **Release & Distribution**
49-
50-
To release your plugin for others to use, you'll create a "release" on GitHub. This packages everything up into a file that Unraid can install.
51-
52-
### How to Create a Release
53-
54-
1. Go to your GitHub repository
55-
2. Click "Releases" (on the right side of the page)
56-
3. Click "Create a new release"
57-
4. Fill out the release form:
58-
- **Tag**: Use your plugin version number (like `2025.01.15`)
59-
- **Release title**: Use the same version number
60-
- **Description**: Explain what your plugin does or what changed in this version
61-
62-
### Version Numbers - Important!
63-
64-
🔢 Use the Unraid convention of YYYY.MM.DD format like `2025.01.15`, `2025.01.16`, `2025.02.01`.
65-
66-
If you need multiple releases on the same day, just add another number at the end.
67-
68-
❌ **Don't use letters in version numbers:**
69-
70-
- `2025.01.01a` ← This won't work properly
71-
- `2025.01.01b` ← This won't work properly
72-
73-
**Use numbers only:**
74-
75-
- `2025.01.01.1` ← This works great
76-
- `2025.01.01.2` ← This works great
77-
78-
---
79-
80-
## Code Quality and Testing (Recommended)
81-
82-
🧪 **Quality & Testing Tools**
83-
84-
The template includes several helpful tools to ensure your plugin works well and avoid hard-to-find bugs:
85-
86-
- 🕵️‍♂️ **phpstan**: Checks your PHP code for potential bugs before you test it - catches issues that might not show up during testing
87-
- 🧹 **php-cs-fixer**: Automatically fixes coding style issues to keep your code clean and maintainable
88-
- 📝 **commitlint**: Ensures your commit messages follow a consistent format
89-
90-
### Why Use These Tools?
91-
92-
These tools help you catch bugs early and keep your code maintainable as your plugin grows. Many issues they find are subtle and might not appear during testing but could cause problems for users later.
93-
94-
### Automatic Checks
95-
96-
⚡ These tools run automatically whenever you upload changes to GitHub, providing an extra safety net.
97-
98-
### Running Checks Manually
99-
100-
You can also check your code locally before uploading:
101-
102-
```bash
103-
# Install the tools (run this once)
104-
composer update
105-
106-
# Check for potential bugs
107-
vendor/bin/phpstan analyse
108-
109-
# Fix code formatting
110-
vendor/bin/php-cs-fixer fix
111-
```
112-
113-
### Adjusting Tool Settings
114-
115-
If phpstan finds too many issues and feels overwhelming:
116-
117-
- You can lower the strictness level in `phpstan.neon` (change `level: 9` to a lower number like `level: 6`)
118-
- Work on fixing issues gradually rather than disabling the tools entirely
119-
120-
### Customizing or Disabling Checks
121-
122-
While it is recommended to keep these tools enabled:
123-
124-
- To disable any checks: Remove them from `.github/workflows/lint.yml`
125-
- To adjust settings: Modify the configuration files:
126-
- `phpstan.neon`: Bug detection settings
127-
- `.php-cs-fixer.dist.php`: Code formatting rules
128-
- `commitlint.config.js`: Commit message rules
129-
130-
---
131-
132-
## Customization Guide (Manual Method)
133-
134-
🛠️ **Customization Steps**
135-
136-
Now that you have your own copy of the template, you need to customize it for your specific plugin. Here are the essential files to modify:
137-
138-
### 1. Basic Plugin Information
139-
140-
📄 **File: `plugin/plugin.json`**
141-
This file contains your plugin's basic information that Unraid uses. You must update these fields:
142-
143-
- **name**: This becomes the filename for your .plg file. It's not the name users see, but the internal name for your plugin.
144-
- **package_name**: The internal package name. This is used by Slackware to identify your plugin. Recommendation: use `unraid-pluginname` (replace `pluginname` with your plugin's name) to avoid conflicts with upstream packages.
145-
- **author**: Your name or organization
146-
- **support**: URL where users can get help (typically a thread on the Unraid forums)
147-
- **launch**: Either update with your plugin's page path or remove if your plugin doesn't have a web interface
148-
- **icon**: Either use a Font Awesome 4.7.0 icon name, or remove this field and provide your own icon at `src/usr/local/emhttp/plugins/plugin-name/name.png` (where "name" matches the name field)
149-
150-
📄 **File: `README.md` (this file)**
151-
Replace this template content with information about your plugin. This appears on your GitHub page and helps users understand what your plugin does.
152-
153-
### 2. Plugin Description (What Users See During Installation)
154-
155-
📝 **File: `src/install/slack-desc`**
156-
This is what users see when your plugin is being installed. Think of it as a brief advertisement for your plugin.
157-
158-
**Important rules:**
159-
160-
- Keep exactly 11 lines of description (plus the ruler line at the top)
161-
- Replace `my-plugin` with your package name (from `plugin.json`)
162-
- Adjust the handy ruler line (the line of dashes) so it lines up with the colon after your package name - this shows the maximum length for each description line
163-
164-
### 3. Plugin Interface Files
165-
166-
📁 **Folder: `src/usr/local/emhttp/plugins/plugin-name`**
167-
168-
- Rename this folder to match your plugin's name from `plugin.json`
169-
- This folder contains the web interface files that appear in Unraid's web UI
170-
171-
📄 **File: `src/usr/local/emhttp/plugins/plugin-name/README.md`**
172-
Update this with your plugin's name and what it does. This appears on Unraid's Plugins page.
173-
174-
### 4. Optional: Diagnostic Information
175-
176-
🩺 **File: `src/usr/local/emhttp/plugins/plugin-name/diagnostics.json.example`**
177-
This helps with troubleshooting your plugin. You can:
178-
179-
- Rename it to `diagnostics.json` to enable custom diagnostic checks
180-
- Update the content to include your plugin's name and specific diagnostic checks
181-
- For detailed information on the diagnostics format, see: https://github.com/dkaser/unraid-plugin-diagnostics
182-
- Leave it as `.example` if you don't need custom diagnostics
183-
184-
### 5. Legal Stuff
185-
186-
⚖️ **File: `LICENSE`**
187-
The template uses "Unlicense" (public domain) so you can choose any license you want for your project. You can change this to any license you prefer. You should always include a license file in your repository to clarify how others can use your code.
34+
The install process follows the [official manual upgrade steps](https://docs.unraid.net/unraid-os/system-administration/maintain-and-update/upgrading-unraid/)

customize.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

plugin/plugin.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version='1.0' standalone='yes'?>
22
<!DOCTYPE PLUGIN>
33

4-
<PLUGIN
4+
<PLUGIN
55
name="{{ name }}"
66
author="{{ author }}"
77
version="{{ env['PLUGIN_VERSION'] }}"

plugin/plugin.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"name": "plugin-name",
3-
"package_name": "my-plugin",
4-
"author": "Your Name",
5-
"min": "7.0.0",
6-
"icon": "question",
7-
"support": "https://...",
8-
"launch": "Tools/Something"
9-
}
2+
"name": "updater",
3+
"package_name": "updater",
4+
"author": "wandercone",
5+
"support": "https://github.com/wandercone/Updater/issues",
6+
"launch": "Tools/Updater",
7+
"icon": "cloud-download "
8+
}

plugin/updater.plg

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version='1.0' standalone='yes'?>
2+
<!DOCTYPE PLUGIN>
3+
4+
<PLUGIN
5+
name="updater"
6+
author="wandercone"
7+
version="2026.03.31"
8+
launch="Tools/Updater"
9+
pluginURL="https://raw.githubusercontent.com/wandercone/Updater/main/plugin/updater.plg"
10+
support="https://github.com/wandercone/Updater/issues"
11+
12+
13+
icon="cloud-download "
14+
>
15+
16+
<CHANGES>
17+
<![CDATA[
18+
19+
### 2026.03.31
20+
21+
- chore: address php-cs-fixer comments
22+
- feat: initial upload
23+
24+
25+
For older releases, see https://github.com/wandercone/Updater/releases
26+
]]>
27+
</CHANGES>
28+
29+
<FILE Name="/boot/config/plugins/updater/updater-2026.03.31-noarch-1.txz">
30+
<URL>https://github.com/wandercone/Updater/releases/download/2026.03.31/updater-2026.03.31-noarch-1.txz</URL>
31+
<SHA256>5e497e5c409d6dd184f524b70287a430f2d222ac2888ddcf922af56e2968c2e2</SHA256>
32+
</FILE>
33+
34+
<!--
35+
The 'install' script.
36+
-->
37+
<FILE Run="/bin/bash">
38+
<INLINE>
39+
<![CDATA[
40+
upgradepkg --install-new /boot/config/plugins/updater/updater-2026.03.31-noarch-1.txz
41+
42+
# cleanup old versions
43+
rm -f $(ls /boot/config/plugins/updater/updater-*.txz 2>/dev/null | grep -v '2026.03.31')
44+
45+
echo ""
46+
echo "----------------------------------------------------"
47+
echo " updater has been installed."
48+
echo " Version: 2026.03.31"
49+
echo "----------------------------------------------------"
50+
echo ""
51+
]]>
52+
</INLINE>
53+
</FILE>
54+
55+
<!--
56+
The 'remove' script.
57+
-->
58+
<FILE Run="/bin/bash" Method="remove">
59+
<INLINE>
60+
<![CDATA[
61+
removepkg updater
62+
63+
rm -rf /usr/local/emhttp/plugins/updater
64+
rm -rf /boot/config/plugins/updater
65+
]]>
66+
</INLINE>
67+
</FILE>
68+
69+
</PLUGIN>

src/install/slack-desc

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
|-----handy-ruler------------------------------------------------------|
2-
my-plugin: my-plugin
3-
my-plugin:
4-
my-plugin: Sample slack-desc file
5-
my-plugin:
6-
my-plugin:
7-
my-plugin:
8-
my-plugin:
9-
my-plugin:
10-
my-plugin:
11-
my-plugin: https://github.com/my-user/my-plugin
12-
my-plugin:
2+
updater: updater
3+
updater:
4+
updater: An unofficial Unraid updater plugin.
5+
updater: Fetches a manual specified releases and installs is via the
6+
updater: documented manual upgrade process.
7+
updater:
8+
updater: https://github.com/wandercone/Updater
9+
updater:

0 commit comments

Comments
 (0)