Merge pull request #13798 from TDT-AG/pr/20201018-extra-command-update
treewide: use new extra_command function for init
This commit is contained in:
commit
5e86f0d94c
30 changed files with 41 additions and 51 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=postfix
|
PKG_NAME:=postfix
|
||||||
PKG_VERSION:=3.5.7
|
PKG_VERSION:=3.5.7
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
|
|
||||||
START=72
|
START=72
|
||||||
STOP=50
|
STOP=50
|
||||||
EXTRA_COMMANDS="status abort flush postinst"
|
|
||||||
EXTRA_HELP=" status Display the service status
|
|
||||||
abort Stop the service abruptly. Running processes are signaled to stop immediately
|
|
||||||
flush Force delivery: attempt to deliver every message in the deferred mail queue
|
|
||||||
postinst Force running a script that checks for users, group, configuration, permissions, etc"
|
|
||||||
|
|
||||||
|
extra_command "status" "Display the service status"
|
||||||
|
extra_command "abort" "Stop the service abruptly. Running processes are signaled to stop immediately"
|
||||||
|
extra_command "flush" "Force delivery: attempt to deliver every message in the deferred mail queue"
|
||||||
|
extra_command "postinst" "Force running a script that checks for users, group, configuration, permissions, etc"
|
||||||
|
|
||||||
postinst() {
|
postinst() {
|
||||||
if [ -z "$(postconf -nh myhostname)" ]; then
|
if [ -z "$(postconf -nh myhostname)" ]; then
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=apfree-wifidog
|
PKG_NAME:=apfree-wifidog
|
||||||
PKG_VERSION:=4.08.1771
|
PKG_VERSION:=4.08.1771
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git
|
PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git
|
||||||
|
|
|
@ -9,8 +9,7 @@ USE_PROCD=1
|
||||||
PROG=/usr/bin/wifidogx
|
PROG=/usr/bin/wifidogx
|
||||||
CONFIGFILE=/tmp/wifidogx.conf
|
CONFIGFILE=/tmp/wifidogx.conf
|
||||||
|
|
||||||
EXTRA_COMMANDS="status"
|
extra_command "status" "Print the status of the service"
|
||||||
EXTRA_HELP=" status Print the status of the service"
|
|
||||||
|
|
||||||
PX5G_BIN="/usr/sbin/px5g"
|
PX5G_BIN="/usr/sbin/px5g"
|
||||||
OPENSSL_BIN="/usr/bin/openssl"
|
OPENSSL_BIN="/usr/bin/openssl"
|
||||||
|
|
|
@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
||||||
PKG_NAME:=gnunet
|
PKG_NAME:=gnunet
|
||||||
|
|
||||||
PKG_VERSION:=0.13.3
|
PKG_VERSION:=0.13.3
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@GNU/gnunet
|
PKG_SOURCE_URL:=@GNU/gnunet
|
||||||
PKG_HASH:=318e06c4134d1a8ce3b4385d82b11316eaaeb9a4dbc5d4b646453dfc53199296
|
PKG_HASH:=318e06c4134d1a8ce3b4385d82b11316eaaeb9a4dbc5d4b646453dfc53199296
|
||||||
|
|
|
@ -9,7 +9,8 @@ PROG=/usr/lib/gnunet/libexec/gnunet-service-arm
|
||||||
GNUNET_HOME=/var/run/gnunet
|
GNUNET_HOME=/var/run/gnunet
|
||||||
# LOGFILE=$GNUNET_HOME/gnunet.log
|
# LOGFILE=$GNUNET_HOME/gnunet.log
|
||||||
CONFIGFILE=$GNUNET_HOME/gnunet.conf
|
CONFIGFILE=$GNUNET_HOME/gnunet.conf
|
||||||
EXTRA_COMMANDS="restart_transport"
|
|
||||||
|
extra_command "restart_transport" "Restart transport"
|
||||||
|
|
||||||
prepare_config() {
|
prepare_config() {
|
||||||
local had_exit_service=0;
|
local had_exit_service=0;
|
||||||
|
|
|
@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=haproxy
|
PKG_NAME:=haproxy
|
||||||
PKG_VERSION:=2.2.4
|
PKG_VERSION:=2.2.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.haproxy.org/download/2.2/src
|
PKG_SOURCE_URL:=https://www.haproxy.org/download/2.2/src
|
||||||
|
|
|
@ -6,8 +6,6 @@ STOP=80
|
||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
EXTRA_COMMANDS="check"
|
|
||||||
|
|
||||||
HAPROXY_BIN="/usr/sbin/haproxy"
|
HAPROXY_BIN="/usr/sbin/haproxy"
|
||||||
HAPROXY_CONFIG="/etc/haproxy.cfg"
|
HAPROXY_CONFIG="/etc/haproxy.cfg"
|
||||||
|
|
||||||
|
@ -20,6 +18,7 @@ start_service() {
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extra_command "check" "Check haproxy config"
|
||||||
check() {
|
check() {
|
||||||
$HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
|
$HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=nginx
|
PKG_NAME:=nginx
|
||||||
PKG_VERSION:=1.19.2
|
PKG_VERSION:=1.19.2
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://nginx.org/download/
|
PKG_SOURCE_URL:=https://nginx.org/download/
|
||||||
|
|
|
@ -64,11 +64,8 @@ reload_service() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extra_command "relog" "Reopen log files (without reloading)"
|
||||||
relog() {
|
relog() {
|
||||||
[ -d /var/log/nginx ] || mkdir -p /var/log/nginx
|
[ -d /var/log/nginx ] || mkdir -p /var/log/nginx
|
||||||
procd_send_signal nginx '*' USR1
|
procd_send_signal nginx '*' USR1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EXTRA_COMMANDS="relog"
|
|
||||||
EXTRA_HELP=" relog Reopen log files (without reloading)"
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ include ./openvswitch.mk
|
||||||
#
|
#
|
||||||
PKG_NAME:=openvswitch
|
PKG_NAME:=openvswitch
|
||||||
PKG_VERSION:=$(ovs_version)
|
PKG_VERSION:=$(ovs_version)
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
|
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
|
||||||
PKG_HASH:=4171e52a8c0ffe160c1daa6687219d902a2a6969b296d223d8dac980ab99a260
|
PKG_HASH:=4171e52a8c0ffe160c1daa6687219d902a2a6969b296d223d8dac980ab99a260
|
||||||
|
|
|
@ -8,7 +8,7 @@ START=15
|
||||||
ovs_ctl="/usr/share/openvswitch/scripts/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
|
ovs_ctl="/usr/share/openvswitch/scripts/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
|
||||||
ovn_ctl="/usr/share/ovn/scripts/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=:
|
ovn_ctl="/usr/share/ovn/scripts/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=:
|
||||||
|
|
||||||
EXTRA_COMMANDS=status
|
extra_command "status" "Get status information"
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
ovs_action start "$@"
|
ovs_action start "$@"
|
||||||
|
|
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=radicale
|
PKG_NAME:=radicale
|
||||||
PKG_VERSION:=1.1.6
|
PKG_VERSION:=1.1.6
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PYPI_NAME:=Radicale
|
PYPI_NAME:=Radicale
|
||||||
PKG_HASH:=c007198ea45ef797344672c681d4c13f8b4aa85c15c41a1156225767a405c92b
|
PKG_HASH:=c007198ea45ef797344672c681d4c13f8b4aa85c15c41a1156225767a405c92b
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
START=80
|
START=80
|
||||||
STOP=10
|
STOP=10
|
||||||
|
|
||||||
EXTRA_COMMANDS="export_storage"
|
extra_command "export_storage" "<PATH>
|
||||||
EXTRA_HELP=" export_storage <PATH>
|
|
||||||
- export the storage into the specified folder
|
- export the storage into the specified folder
|
||||||
- <PATH> can be directly used with the default storage backend of Radicale 2.x.x."
|
- <PATH> can be directly used with the default storage backend of Radicale 2.x.x."
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=seafile-server
|
PKG_NAME:=seafile-server
|
||||||
PKG_VERSION:=7.1.5
|
PKG_VERSION:=7.1.5
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
|
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
START=99
|
START=99
|
||||||
STOP=01
|
STOP=01
|
||||||
EXTRA_COMMANDS="generate_uci_conf"
|
|
||||||
|
extra_command "generate_uci_conf" "Generate uci config"
|
||||||
|
|
||||||
TOPDIR=/usr/share/seafile
|
TOPDIR=/usr/share/seafile
|
||||||
INSTALLPATH=$TOPDIR/seafile-server
|
INSTALLPATH=$TOPDIR/seafile-server
|
||||||
|
|
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=simple-adblock
|
PKG_NAME:=simple-adblock
|
||||||
PKG_VERSION:=1.8.4
|
PKG_VERSION:=1.8.4
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,11 @@ USE_PROCD=1
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
EXTRA_COMMANDS='check dl killcache sizes show version'
|
extra_command "check" "Checks if specified domain is found in current block-list"
|
||||||
# shellcheck disable=SC2034
|
extra_command "dl" "Force-downloads all enabled block-list"
|
||||||
EXTRA_HELP=' check Checks if specified domain is found in current block-list
|
extra_command "sizes" "Displays the file-sizes of enabled block-listo"
|
||||||
dl Force-downloads all enabled block-list
|
extra_command "show" "Shows the service last-run status"
|
||||||
sizes Displays the file-sizes of enabled block-lists
|
extra_command "version" "Show version"
|
||||||
show Shows the service last-run status'
|
|
||||||
|
|
||||||
readonly packageName='simple-adblock'
|
readonly packageName='simple-adblock'
|
||||||
readonly serviceName="$packageName $PKG_VERSION"
|
readonly serviceName="$packageName $PKG_VERSION"
|
||||||
|
|
|
@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=tgt
|
PKG_NAME:=tgt
|
||||||
PKG_VERSION:=1.0.79
|
PKG_VERSION:=1.0.79
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
START=91
|
START=91
|
||||||
STOP=10
|
STOP=10
|
||||||
|
|
||||||
EXTRA_COMMANDS="show"
|
extra_command "show" "Show current configuration of tgtd"
|
||||||
EXTRA_HELP=" show Show current configuration of tgtd"
|
|
||||||
|
|
||||||
NAME=tgt
|
NAME=tgt
|
||||||
PROG=/usr/sbin/tgtd
|
PROG=/usr/sbin/tgtd
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=tinc
|
PKG_NAME:=tinc
|
||||||
PKG_VERSION:=1.0.36
|
PKG_VERSION:=1.0.36
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.tinc-vpn.org/packages
|
PKG_SOURCE_URL:=https://www.tinc-vpn.org/packages
|
||||||
|
|
|
@ -10,7 +10,8 @@ START=42
|
||||||
SERVICE_USE_PID=1
|
SERVICE_USE_PID=1
|
||||||
|
|
||||||
BIN=/usr/sbin/tincd
|
BIN=/usr/sbin/tincd
|
||||||
EXTRA_COMMANDS="up down"
|
extra_command "up" "<instance> Setting instance up"
|
||||||
|
extra_command "down" "<instance> Setting instance down"
|
||||||
|
|
||||||
LIST_SEP="
|
LIST_SEP="
|
||||||
"
|
"
|
||||||
|
|
|
@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=vpn-policy-routing
|
PKG_NAME:=vpn-policy-routing
|
||||||
PKG_VERSION:=0.2.1
|
PKG_VERSION:=0.2.1
|
||||||
PKG_RELEASE:=13
|
PKG_RELEASE:=14
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,7 @@ readonly _ERROR_='\033[0;31mERROR\033[0m'
|
||||||
readonly _WARNING_='\033[0;33mWARNING\033[0m'
|
readonly _WARNING_='\033[0;33mWARNING\033[0m'
|
||||||
readonly readmeURL="https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md"
|
readonly readmeURL="https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md"
|
||||||
|
|
||||||
export EXTRA_COMMANDS='support'
|
extra_command "support" "Generates output required to troubleshoot routing issues
|
||||||
export EXTRA_HELP=" support Generates output required to troubleshoot routing issues
|
|
||||||
Use '-d' option for more detailed output
|
Use '-d' option for more detailed output
|
||||||
Use '-p' option to automatically upload data under VPR paste.ee account
|
Use '-p' option to automatically upload data under VPR paste.ee account
|
||||||
WARNING: while paste.ee uploads are unlisted, they are still publicly available
|
WARNING: while paste.ee uploads are unlisted, they are still publicly available
|
||||||
|
|
|
@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=vpnbypass
|
PKG_NAME:=vpnbypass
|
||||||
PKG_VERSION:=1.3.1
|
PKG_VERSION:=1.3.1
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=10
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ START=94
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
EXTRA_COMMANDS='version'
|
extra_command "version" "Print version information"
|
||||||
version() { echo "$PKG_VERSION"; }
|
version() { echo "$PKG_VERSION"; }
|
||||||
|
|
||||||
readonly __ERROR__='\033[0;31mERROR\033[0m'
|
readonly __ERROR__='\033[0;31mERROR\033[0m'
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=wifidog
|
PKG_NAME:=wifidog
|
||||||
PKG_VERSION:=1.3.0
|
PKG_VERSION:=1.3.0
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/wifidog/wifidog-gateway
|
PKG_SOURCE_URL:=https://github.com/wifidog/wifidog-gateway
|
||||||
|
|
|
@ -4,8 +4,7 @@ START=65
|
||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
EXTRA_COMMANDS="status"
|
extra_command "status" "Print the status of the service"
|
||||||
EXTRA_HELP=" status Print the status of the service"
|
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
|
|
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=docker-ce
|
PKG_NAME:=docker-ce
|
||||||
PKG_VERSION:=19.03.13
|
PKG_VERSION:=19.03.13
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE
|
PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
START=25
|
START=25
|
||||||
|
|
||||||
EXTRA_COMMANDS="uciadd ucidel"
|
extra_command "uciadd" "Add default bridge configuration to network and firewall uci config"
|
||||||
EXTRA_HELP="\
|
extra_command "ucidel" "Delete default bridge configuration from network and firewall uci config"
|
||||||
uciadd Add default bridge configuration to network and firewall uci config
|
|
||||||
ucidel Delete default bridge configuration from network and firewall uci config"
|
|
||||||
|
|
||||||
DOCKERD_CONF="/tmp/dockerd/daemon.json"
|
DOCKERD_CONF="/tmp/dockerd/daemon.json"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue