Made directory variables for /etc/systemd/system , /etc/cron.d , /usr/local/bin
This commit is contained in:
@ -29,6 +29,9 @@ matrix_base_data_path: "/matrix"
|
||||
matrix_base_data_path_mode: "750"
|
||||
|
||||
matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files"
|
||||
matrix_systemd_path: "/etc/systemd/system"
|
||||
matrix_cron_path: "/etc/cron.d"
|
||||
matrix_local_bin_path: "/usr/local/bin"
|
||||
|
||||
matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}"
|
||||
|
||||
|
@ -52,6 +52,6 @@
|
||||
- name: Ensure matrix-remove-all script created
|
||||
template:
|
||||
src: "{{ role_path }}/templates/usr-local-bin/matrix-remove-all.j2"
|
||||
dest: "/usr/local/bin/matrix-remove-all"
|
||||
dest: "{{ matrix_local_bin_path }}/matrix-remove-all"
|
||||
mode: 0750
|
||||
|
||||
|
@ -15,15 +15,15 @@ if [ "$sure" != "Yes, I really want to remove everything!" ]; then
|
||||
exit 0
|
||||
else
|
||||
echo "Stop and remove matrix services"
|
||||
for s in $(find /etc/systemd/system/ -name "matrix-*" -printf "%f\n"); do
|
||||
for s in $(find {{ matrix_systemd_path }}/ -name "matrix-*" -printf "%f\n"); do
|
||||
systemctl stop $s
|
||||
rm -f /etc/systemd/system/$s
|
||||
rm -f {{ matrix_systemd_path }}/$s
|
||||
done
|
||||
systemctl daemon-reload
|
||||
echo "Remove matrix cronjobs"
|
||||
find /etc/cron.d/ -name "matrix-*" -delete
|
||||
echo "Remove matrix scripts"
|
||||
find /usr/local/bin/ -name "matrix-*" -delete
|
||||
find {{ matrix_local_bin_path }}/ -name "matrix-*" -delete
|
||||
echo "Remove every docker images"
|
||||
docker rmi $(docker images -aq)
|
||||
echo "Remove docker matrix network"
|
||||
|
Reference in New Issue
Block a user