Skip to content
Extraits de code Groupes Projets
Valider e494cc32 rédigé par cam.lafit's avatar cam.lafit
Parcourir les fichiers

Display crontab status

Inform about crontab content without display itself
parent f831d7a7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -322,14 +322,19 @@ function clean_spip() { ...@@ -322,14 +322,19 @@ function clean_spip() {
function check_crontab() { function check_crontab() {
local spip_dir local spip_dir
local user local user
local crontab_content
spip_dir=$1 spip_dir=$1
user=$(stat --printf %U "${spip_dir}") user=$(stat --printf %U "${spip_dir}")
# Process only once each crontab # Process only once each crontab
if [[ $(echo "${global_crontab_users[@]}" | grep -ow "${user}" | wc -w) -lt 1 ]]; then if [[ $(echo "${global_crontab_users[@]}" | grep -ow "${user}" | wc -w) -lt 1 ]]; then
global_crontab_users+=("${user}") global_crontab_users+=("${user}")
crontab -lu "${user}" if crontab_content=$(crontab -lu "${user}") ; then
vprint "$user has a crontab to check" "RED"
else
vprint "$crontab_content" "WHITE"
fi
fi fi
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter