Browse Source

rename ffho-aptimer -> ffho-ap-timer

Karsten Böddeker 7 years ago
parent
commit
67820451dc

+ 5 - 5
ffho/ffho-aptimer/Makefile → ffho/ffho-ap-timer/Makefile

@@ -1,6 +1,6 @@
 include $(TOPDIR)/rules.mk
 
-PKG_NAME:=ffho-aptimer
+PKG_NAME:=ffho-ap-timer
 PKG_VERSION:=1
 PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
 
@@ -8,7 +8,7 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/ffho-aptimer
+define Package/ffho-ap-timer
   SECTION:=ffho
   CATEGORY:=FFHO
   TITLE:=Timer for the client wifi
@@ -17,7 +17,7 @@ define Package/ffho-aptimer
   URL:=https://git.c3pb.de/freifunk-pb/ffho-packages
 endef
 
-define Package/ffho-aptimer/description
+define Package/ffho-ap-timer/description
 	Timer for the client wifi
 endef
 
@@ -31,8 +31,8 @@ endef
 define Build/Compile
 endef
 
-define Package/ffho-aptimer/install
+define Package/ffho-ap-timer/install
   $(CP) ./files/* $(1)/
 endef
 
-$(eval $(call BuildPackage,ffho-aptimer))
+$(eval $(call BuildPackage,ffho-ap-timer))

+ 10 - 10
ffho/ffho-aptimer/ReadMe.md → ffho/ffho-ap-timer/ReadMe.md

@@ -1,29 +1,29 @@
-ffho-aptimer
-============
+ffho-ap-timer
+=============
 
 Timer for the client wifi with three modes (daily, weekly, monthly)
 
-/etc/config/aptimer
+/etc/config/ap-timer
 -------------------
 
-**aptimer.settings.enabled:**
-- `0` disables the aptimer (default)
-- `1` enables the aptimer
+**ap-timer.settings.enabled:**
+- `0` disables the ap-timer (default)
+- `1` enables the ap-timer
 
-**aptimer.settings.type:**
+**ap-timer.settings.type:**
 - `day`, $day = all
 - `week`, $day = [Mon|Tue|Wed|Thu|Fri|Sat|Sun]
 - `month`, $day = [01-31]
 
-**aptimer.$day.on:**
+**ap-timer.$day.on:**
 - List of time to enable wireless
 
-**aptimer.$day.off:**
+**ap-timer.$day.off:**
 - List of time to disable wireless
 
 ### example
 ```
-config aptimer 'settings'
+config ap-timer 'settings'
 	option enabled '1'
 	option type 'week'
 

+ 1 - 1
ffho/ffho-aptimer/files/etc/config/aptimer → ffho/ffho-ap-timer/files/etc/config/ap-timer

@@ -1,4 +1,4 @@
-#config aptimer 'settings'
+#config ap-timer 'settings'
 #	option enabled '1'
 #	option type 'day'
 #

+ 2 - 0
ffho/ffho-ap-timer/files/lib/gluon/upgrade/900-remove-aptimer-config

@@ -0,0 +1,2 @@
+#!/bin/sh
+rm -f /etc/config/aptimer

+ 1 - 0
ffho/ffho-ap-timer/files/usr/lib/micron.d/ap-timer

@@ -0,0 +1 @@
+* * * * * /usr/sbin/ap-timer

+ 4 - 4
ffho/ffho-aptimer/files/usr/sbin/aptimer → ffho/ffho-ap-timer/files/usr/sbin/ap-timer

@@ -17,7 +17,7 @@ function compare(list, value)
 end
 
 function getDay()
-  local type = uci:get('aptimer','settings','type')
+  local type = uci:get('ap-timer','settings','type')
   if type == 'day' then return 'all'
   elseif type == 'week' then return os.date('%a', timestamp)
   elseif type == 'month' then return os.date('%d', timestamp)
@@ -41,12 +41,12 @@ function apSet(value)
   end
 end
 
-if uci:get_bool('aptimer','settings','enabled') then
+if uci:get_bool('ap-timer','settings','enabled') then
   local day = getDay()
   local current = os.date("%H:%M", timestamp)
 
-  local off = compare(uci:get_list('aptimer', day, 'off'), current)
-  local on = compare(uci:get_list('aptimer', day, 'on'), current)
+  local off = compare(uci:get_list('ap-timer', day, 'off'), current)
+  local on = compare(uci:get_list('ap-timer', day, 'on'), current)
 
   if on and not off then
     apSet(true)

+ 0 - 1
ffho/ffho-aptimer/files/usr/lib/micron.d/aptimer

@@ -1 +0,0 @@
-* * * * * /usr/sbin/aptimer