diff --git a/packages/addons/service/inadyn/changelog.txt b/packages/addons/service/inadyn/changelog.txt new file mode 100644 index 0000000000..9455e1f3c8 --- /dev/null +++ b/packages/addons/service/inadyn/changelog.txt @@ -0,0 +1,2 @@ +8.0.100 +- Initial addon diff --git a/packages/addons/service/inadyn/icon/icon.png b/packages/addons/service/inadyn/icon/icon.png new file mode 100644 index 0000000000..2e39354544 Binary files /dev/null and b/packages/addons/service/inadyn/icon/icon.png differ diff --git a/packages/addons/service/inadyn/package.mk b/packages/addons/service/inadyn/package.mk new file mode 100644 index 0000000000..9963bdef5b --- /dev/null +++ b/packages/addons/service/inadyn/package.mk @@ -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 . +################################################################################ + +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 +} diff --git a/packages/addons/service/inadyn/source/bin/inadyn-service b/packages/addons/service/inadyn/source/bin/inadyn-service new file mode 100644 index 0000000000..669ab29f93 --- /dev/null +++ b/packages/addons/service/inadyn/source/bin/inadyn-service @@ -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 . +################################################################################ + +. /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 + diff --git a/packages/addons/service/inadyn/source/default.py b/packages/addons/service/inadyn/source/default.py new file mode 100644 index 0000000000..0a5065ba27 --- /dev/null +++ b/packages/addons/service/inadyn/source/default.py @@ -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 . +################################################################################ + +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() + diff --git a/packages/addons/service/inadyn/source/resources/language/English/strings.po b/packages/addons/service/inadyn/source/resources/language/English/strings.po new file mode 100644 index 0000000000..16a02364e8 --- /dev/null +++ b/packages/addons/service/inadyn/source/resources/language/English/strings.po @@ -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 "" diff --git a/packages/addons/service/inadyn/source/resources/settings.xml b/packages/addons/service/inadyn/source/resources/settings.xml new file mode 100644 index 0000000000..8ae445241d --- /dev/null +++ b/packages/addons/service/inadyn/source/resources/settings.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/packages/addons/service/inadyn/source/settings-default.xml b/packages/addons/service/inadyn/source/settings-default.xml new file mode 100644 index 0000000000..17b76dcb0f --- /dev/null +++ b/packages/addons/service/inadyn/source/settings-default.xml @@ -0,0 +1,4 @@ + + + + diff --git a/packages/addons/service/inadyn/source/system.d/service.system.inadyn.service b/packages/addons/service/inadyn/source/system.d/service.system.inadyn.service new file mode 100644 index 0000000000..b5207906b2 --- /dev/null +++ b/packages/addons/service/inadyn/source/system.d/service.system.inadyn.service @@ -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