Skip to content

Commit

Permalink
1.0.3 Fixed fusion-inv cron + file-backups cron
Browse files Browse the repository at this point in the history
  • Loading branch information
medilies committed Dec 6, 2021
1 parent db9316a commit 6ca8c76
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
20 changes: 20 additions & 0 deletions glpi/scripts/files_backer_cron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
#
# Writter : Boudouma Mohamed Ilies (medilies)
# Github repo: https://github.com/medilies/glpi
# My Linkedin: https://www.linkedin.com/in/medilies/
# -----------------------------------------------------------------------------

# Script to create a cronjob for web directory backup
echo "*/1 * * * * root /scripts/files_backer.sh" >/etc/cron.d/files_backer &&
chown root /etc/cron.d/files_backer &&
chgrp root /etc/cron.d/files_backer &&
chmod 0700 /etc/cron.d/files_backer &&
# crontab -u root /etc/cron.d/files_backer &&
/etc/init.d/cron restart

# NOTE
# Debian cron specific, Set a cron job
# Just by putting a file with a cron job specification in /cron.d
# And making the file readable by root
# Then retarting cron
8 changes: 5 additions & 3 deletions glpi/scripts/install_fusioninventory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ curl -L https://github.com/fusioninventory/fusioninventory-for-glpi/releases/dow
glpicli plugin:install fusioninventory -u glpi &&
glpicli plugin:activate fusioninventory &&
chown -R www-data /var/www/html &&
#
echo "*/1 * * * * php /var/www/html/front/cron.php &>/dev/null" \
>>/etc/crontab &&
echo "* */6 * * * root php /var/www/html/front/cron.php &>/dev/null" >/etc/cron.d/fusioninventory_taskschedular &&
chown root /etc/cron.d/fusioninventory_taskschedular &&
chgrp root /etc/cron.d/fusioninventory_taskschedular &&
chmod 0700 /etc/cron.d/fusioninventory_taskschedular &&
# crontab -u root /etc/cron.d/fusioninventory_taskschedular &&
/etc/init.d/cron restart

0 comments on commit 6ca8c76

Please sign in to comment.