106 lines
3.1 KiB
XML
106 lines
3.1 KiB
XML
<?xml version='1.0' standalone='yes'?>
|
|
<!DOCTYPE PLUGIN [
|
|
<!ENTITY name "headscale-admin">
|
|
<!ENTITY author "ich777">
|
|
<!ENTITY version "2025.05.16">
|
|
<!ENTITY launch "Settings/headscale-admin">
|
|
<!ENTITY gitURL "https://github.com/&author;/unraid-&name;/raw/master">
|
|
<!ENTITY pluginURL "&gitURL;/&name;.plg">
|
|
<!ENTITY md5 "803a75590af5c82e8441e3b04a61d17a">
|
|
<!ENTITY plugin "/boot/config/plugins/&name;">
|
|
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
|
|
]>
|
|
|
|
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.12.0" icon="headscale.png" support="https://forums.unraid.net/topic/92865-support-ich777-amd-vendor-reset-coraltpu-hpsahba">
|
|
|
|
<CHANGES>
|
|
|
|
###2025.05.16
|
|
- Reduce line spacing for IP addresses on the Nodes and Routes pages
|
|
|
|
###2025.05.08
|
|
- Compatibility update for Headscale v0.26.0-beta.1
|
|
|
|
###2025.04.07a
|
|
- More fixes for php warnings when API mode is used
|
|
|
|
###2025.04.07
|
|
- Add Restart Container button when plugin is running in local mode to Settings page
|
|
- Fix for missing Create User form for new installations
|
|
|
|
###2025.04.04
|
|
- More fixes for php warnings
|
|
|
|
###2025.04.02
|
|
- Fix php warnings
|
|
|
|
###2025.03.29
|
|
- Initial Release
|
|
|
|
</CHANGES>
|
|
|
|
<FILE Run="/bin/bash">
|
|
<INLINE>
|
|
rm -f $(ls /boot/config/plugins/&name;/&name;*.txz 2>/dev/null|grep -v '&version;')
|
|
</INLINE>
|
|
</FILE>
|
|
|
|
<FILE Name="/boot/config/plugins/&name;/&name;-&version;.txz" Run="upgradepkg --install-new">
|
|
<URL>&gitURL;/packages/&name;-&version;.txz</URL>
|
|
<MD5>&md5;</MD5>
|
|
</FILE>
|
|
|
|
<FILE Name="&emhttp;/README.md">
|
|
<INLINE>
|
|
**Headscale Administration Panel**
|
|
|
|
This plugin is a simple Administration Panel for Headscale
|
|
|
|
Note: This plugin supports both Local mode (through docker exec) and API mode (through the API), please visit the settings if you are planing to use the plugin in API mode.
|
|
</INLINE>
|
|
</FILE>
|
|
|
|
<FILE Run="/bin/bash">
|
|
<INLINE>
|
|
|
|
#Create settings file if not found and try to get Headscale container name
|
|
if [ ! -f "&plugin;/settings.cfg" ]; then
|
|
echo 'METHOD=local
|
|
CONTAINER_NAME=
|
|
URL=
|
|
API_KEY=' > "&plugin;/settings.cfg"
|
|
|
|
echo
|
|
echo "Trying to determine Headscale Container name for Local mode"
|
|
CONTAINERNAME="$(docker ps -a --format "{{.Names}}" 2>/dev/null | grep -i "^headscale$")"
|
|
if [ -z "${CONTAINERNAME}" ]; then
|
|
echo "Couldn't determine Container name from Headscale!"
|
|
echo "Please go to the plugin page and configure the plugin manually!"
|
|
else
|
|
echo "Setting Headscale Container name to: ${CONTAINERNAME}"
|
|
sed -i "/^CONTAINER_NAME=/c\\CONTAINER_NAME=${CONTAINERNAME}" "&plugin;/settings.cfg"
|
|
fi
|
|
echo
|
|
fi
|
|
|
|
</INLINE>
|
|
</FILE>
|
|
|
|
<FILE Run="/bin/bash" Method="remove">
|
|
<INLINE>
|
|
|
|
echo "-----------------------------------------------"
|
|
echo "---Uninstalling Headscale Admin Panel plugin---"
|
|
echo "-----------------------------------------------"
|
|
# Remove plugin related files
|
|
removepkg &name;-&version;
|
|
rm -rf /usr/local/emhttp/plugins/&name; &plugin;
|
|
echo
|
|
echo "------------------------------------------------------"
|
|
echo "------Headscale Admin Panel plugin uninstalled!-------"
|
|
echo "------------------------------------------------------"
|
|
echo
|
|
|
|
</INLINE>
|
|
</FILE>
|
|
</PLUGIN> |