From 0ab34c42554d00099aa50beb1828b0ebaec641af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 26 Jul 2020 10:29:15 +0200 Subject: personal-enabler: add --- personal-enabler/Makefile | 34 ++++++++++++++++++++++++++++++++++ personal-enabler/files/common.sh | 26 ++++++++++++++++++++++++++ personal-enabler/files/sentinel.sh | 10 ++++++++++ updater.lua | 3 ++- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 personal-enabler/Makefile create mode 100644 personal-enabler/files/common.sh create mode 100644 personal-enabler/files/sentinel.sh diff --git a/personal-enabler/Makefile b/personal-enabler/Makefile new file mode 100644 index 0000000..a592879 --- /dev/null +++ b/personal-enabler/Makefile @@ -0,0 +1,34 @@ +# +## Copyright (C) 2020 Karel Kočí +# +## This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=personal-enabler +PKG_VERSION:=1.0.0 +PKG_MAINTAINER:=Karel Kočí +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define PKG + +define Package/personal-enabler-$(1) + TITLE:=Personal configurator: $(1) + DEPENDS:=+uci $(2) +endef + +define Package/personal-enabler-$(1)/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/$(1).sh $(1)/etc/uci-defaults/60-$(1) +endef + +endef + +Build/Compile:=: + +$(eval $(call PKG,common,+updater-ng +user-notify)) +$(eval $(call PKG,sentinel,+pkglists +sentinel-proxy)) diff --git a/personal-enabler/files/common.sh b/personal-enabler/files/common.sh new file mode 100644 index 0000000..b6469ee --- /dev/null +++ b/personal-enabler/files/common.sh @@ -0,0 +1,26 @@ +#!/bin/sh +hostname="$(uci get system.@system[0].hostname)" +case "$hostname" in + work-*) + mail="karel.koci@nic.cz" + ;; + *) + mail="cynerd@email.cz" + ;; +esac + +uci -q batch <