makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # ---------- ---------- ---------- ---------- ---------- ----------
  2. #
  3. # GNUsocial maintenance tasks
  4. #
  5. # ---------- ---------- ---------- ---------- ---------- ----------
  6. _PathToGnusocial=../gnusocial.no/
  7. PathToGnusocial=$(if $(p),$(p),$(_PathToGnusocial))
  8. PathToBackupScript=./plugins/backup.sh
  9. TimeLimit=$(if $(t),$(t),`date +%F`)
  10. target: help
  11. # ---------- ---------- ---------- ---------- ---------- ----------
  12. #NOTE: The recipes follow:
  13. # ---------- ---------- ---------- ---------- ---------- ----------
  14. .PHONY: testing
  15. testing:
  16. @echo testing
  17. @echo $(_PathToGnusocial)
  18. @echo $(PathToGnusocial)
  19. @echo $(PathToBackupScript)
  20. @echo done
  21. .PHONY: help
  22. help:
  23. @echo use init, backup, or maintenance...
  24. .PHONY: dump
  25. dump:
  26. @./src/backups.sh $(PathToGnusocial)
  27. .PHONY: start
  28. start:
  29. @echo Starting daemons...
  30. $(PathToGnusocial)scripts/startdaemons.sh
  31. @echo done
  32. .PHONY: stop
  33. stop:
  34. @echo Stopping daemons...
  35. $(PathToGnusocial)scripts/stopdaemons.sh
  36. @echo done
  37. .PHONY: restart
  38. restart:
  39. @echo Restarting daemons...
  40. $(PathToGnusocial)scripts/stopdaemons.sh
  41. $(PathToGnusocial)scripts/startdaemons.sh
  42. @echo done
  43. .PHONY: basic
  44. basic:
  45. @echo Running quick maintenance...
  46. $(PathToGnusocial)scripts/stopdaemons.sh
  47. php $(PathToGnusocial)scripts/upgrade.php
  48. @echo next
  49. php $(PathToGnusocial)scripts/checkschema.php
  50. php $(PathToGnusocial)scripts/updateurls.php
  51. $(PathToGnusocial)scripts/startdaemons.sh
  52. @echo done
  53. .PHONY: gc
  54. gc:
  55. @php $(PathToGnusocial)plugins/StoreRemoteMedia/scripts/removeRemoteMedia.php --all --limit $(TimeLimit)
  56. @php $(PathToGnusocial)scripts/delete_orphan_files.php --yes