๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/seafile/templates/cleanup.j2

24 lines
541 B

2 years ago
#!/bin/bash
# stop the server
echo Stopping the Seafile-Server...
systemctl stop seahub.service
systemctl stop seafile.service
echo Giving the server some time to shut down properly....
sleep 20
# run the cleanup
echo Seafile cleanup started...
su {{ seaf_user | quote }} -c {{ (seaf_dir ~ '/seafile-server-latest/seaf-gc.sh') | quote }}
echo Giving the server some time....
sleep 10
# start the server again
echo Starting the Seafile-Server...
systemctl start seafile.service
systemctl start seahub.service
echo Seafile cleanup done!