mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
inadyn: initial addon
This commit is contained in:
parent
8b0c9525c9
commit
81705f6afd
2
packages/addons/service/inadyn/changelog.txt
Normal file
2
packages/addons/service/inadyn/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
8.0.100
|
||||
- Initial addon
|
BIN
packages/addons/service/inadyn/icon/icon.png
Normal file
BIN
packages/addons/service/inadyn/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
54
packages/addons/service/inadyn/package.mk
Normal file
54
packages/addons/service/inadyn/package.mk
Normal file
@ -0,0 +1,54 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="inadyn"
|
||||
PKG_VERSION="1.99.15"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE="http://troglobit.com/inadyn.html"
|
||||
PKG_URL="ftp://troglobit.com/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain libressl"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service/system"
|
||||
PKG_SHORTDESC="Inadyn, a small and simple DDNS client"
|
||||
PKG_LONGDESC="Inadyn is a small and simple DDNS client with HTTPS support. It is commonly available in many GNU/Linux distributions, used in off-the-shelf routers and Internet gateways to automate the task of keeping your DNS record up to date with any IP address changes from your ISP. It can also be used in installations with redundant (backup) connections to the Internet."
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy at gmail.com)"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_ADDON_PROVIDES=""
|
||||
PKG_ADDON_REPOVERSION="8.0"
|
||||
|
||||
PKG_AUTORECONF="yes"
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-openssl" # --sysconfdir is ineffective
|
||||
|
||||
pre_configure_target() {
|
||||
# inadyn fails to build in subdirs
|
||||
cd $ROOT/$PKG_BUILD
|
||||
rm -rf .$TARGET_NAME
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/src/inadyn $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
43
packages/addons/service/inadyn/source/bin/inadyn-service
Normal file
43
packages/addons/service/inadyn/source/bin/inadyn-service
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.inadyn
|
||||
|
||||
config="$ADDON_HOME/inadyn.conf"
|
||||
|
||||
options="-b"
|
||||
if [ "$inadyn_S" == "inadyn.conf" ]
|
||||
then
|
||||
if [ -f "$config" ] && [ -s "$config" ]
|
||||
then
|
||||
options="$options -F $config"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
options="$options -S $inadyn_S -u $inadyn_u -p $inadyn_p -a $inadyn_a"
|
||||
if [ "$inadyn_s" == "true" ]
|
||||
then
|
||||
options="$options -s"
|
||||
fi
|
||||
fi
|
||||
|
||||
inadyn $options
|
||||
|
36
packages/addons/service/inadyn/source/default.py
Normal file
36
packages/addons/service/inadyn/source/default.py
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.id = xbmcaddon.Addon().getAddonInfo('id')
|
||||
|
||||
def onSettingsChanged(self):
|
||||
subprocess.call(['systemctl', 'restart', self.id])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Monitor().waitForAbort()
|
||||
|
@ -0,0 +1,30 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: syncthing
|
||||
# Addon id: service.system.inadyn
|
||||
# Addon Provider: awiouy at gmail dot com
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "Provider"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Alias"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "SSL"
|
||||
msgstr ""
|
10
packages/addons/service/inadyn/source/resources/settings.xml
Normal file
10
packages/addons/service/inadyn/source/resources/settings.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting id="inadyn_S" label="30001" type="labelenum" values="inadyn.conf|default@dyndns.org|default@freedns.afraid.org|default@zoneedit.com|default@no-ip.com|default@easydns.com|default@tzo.com|dyndns@3322.org|default@dnsomatic.com|dyndns@he.net|default@tunnelbroker.net|default@dynsip.org|default@sitelutions.com|default@dnsexit.com|default@changeip.com|default@zerigo.com|default@dhis.org|ipv4@nsupdate.info|default@duckdns.org|default@loopia.com|default@duiadns.net" />
|
||||
<setting id="inadyn_u" label="30002" type="text" visible="!eq(-1,0)" />
|
||||
<setting id="inadyn_p" label="30003" type="text" visible="!eq(-2,0)" option="hidden" />
|
||||
<setting id="inadyn_a" label="30004" type="text" visible="!eq(-3,0)" />
|
||||
<setting id="inadyn_s" label="30005" type="bool" visible="!eq(-4,0)" default="true"/>
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,4 @@
|
||||
<settings>
|
||||
<setting id="inadyn_S" value="inadyn.conf" />
|
||||
</settings>
|
||||
|
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=inadyn
|
||||
After=network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.system.inadyn/bin/inadyn-service
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user