tang: use sbin instead of libexec

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos 2022-04-26 09:50:08 +02:00
parent 17d759c7fd
commit 21937be8ed
2 changed files with 4 additions and 4 deletions

View File

@ -39,9 +39,9 @@ endef
define Package/tang/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tang-show-keys $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/tangd* $(1)/usr/libexec/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/tangd* $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/tang.init $(1)/etc/init.d/tang
$(INSTALL_DIR) $(1)/etc/config

View File

@ -7,7 +7,7 @@ start_service() {
KEYS=$(find /usr/share/tang/db -name "*.jw*" -maxdepth 1 | wc -l)
if [ -z "${KEYS}" ] || [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair
mkdir -p /usr/share/tang/db
/usr/libexec/tangd-keygen /usr/share/tang/db
/usr/sbin/tangd-keygen /usr/share/tang/db
fi
config_load "tang"
@ -17,7 +17,7 @@ start_service() {
[ "${enabled}" = "1" ] || return
procd_open_instance
procd_set_param command /usr/libexec/tangd -p "${port}" -l /usr/share/tang/db
procd_set_param command /usr/sbin/tangd -p "${port}" -l /usr/share/tang/db
procd_set_param respawn
procd_set_param user tang
procd_close_instance