mirror of
https://github.com/limosek/zaf.git
synced 2024-11-13 05:59:06 +01:00
Repaired plugin installation checks
This commit is contained in:
parent
122c6fc831
commit
b892cb067d
@ -115,6 +115,7 @@ zaf_ctrl_sudo() {
|
||||
|
||||
pdir="$3"
|
||||
plugin=$1
|
||||
! [ -d "$ZAF_SUDOERSD" ] && zaf_wrn "$ZAF_SUDOERSD nonexistent! Skipping sudo install!"
|
||||
zaf_dbg "Installing sudoers entry $ZAF_SUDOERSD/zaf_$plugin"
|
||||
sudo=$(zaf_ctrl_get_global_option $2 "Sudo" | zaf_far '{PLUGINDIR}' "${plugindir}")
|
||||
[ -z "$sudo" ] && return # Nothing to install
|
||||
@ -142,6 +143,7 @@ zaf_ctrl_cron() {
|
||||
|
||||
pdir="$3"
|
||||
plugin=$1
|
||||
! [ -d "$ZAF_CROND" ] && zaf_wrn "$ZAF_CROND nonexistent! Skipping cron install!"
|
||||
zaf_dbg "Installing cron entry $ZAF_CROND/zaf_$plugin"
|
||||
cron=$(zaf_ctrl_get_global_option $2 "Cron")
|
||||
[ -z "$cron" ] && return # Nothing to install
|
||||
|
@ -296,12 +296,12 @@ zaf_install_plugin() {
|
||||
control=${plugindir}/control.zaf
|
||||
[ "$ZAF_DEBUG" -gt 1 ] && zaf_plugin_info "${control}"
|
||||
zaf_ctrl_check_deps "${control}"
|
||||
zaf_ctrl_install "$url" "${control}" "${plugindir}"
|
||||
zaf_ctrl_sudo "$plugin" "${control}" "${plugindir}"
|
||||
zaf_ctrl_cron "$plugin" "${control}" "${plugindir}"
|
||||
zaf_ctrl_generate_cfg "${control}" "${plugin}" \
|
||||
| zaf_far '{PLUGINDIR}' "${plugindir}" >${ZAF_AGENT_CONFIGD}/zaf_${plugin}.conf
|
||||
zaf_dbg "Generated ${ZAF_AGENT_CONFIGD}/zaf_${plugin}.conf"
|
||||
zaf_ctrl_install "$url" "${control}" "${plugindir}"
|
||||
else
|
||||
zaf_err "Cannot install plugin '$plugin' to $plugindir!"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user