Commit 1f5030bd35495c7ba3f28c864bd01f414ac9bdd4
1 parent
42e4f8d600
Exists in
master
Add hook
Showing 3 changed files with 9 additions and 0 deletions Side-by-side Diff
hooks/post_user_create
scripts/install
... | ... | @@ -56,6 +56,10 @@ sudo sed -i "s@PATHTOCHANGE@$path@g" /etc/nginx/conf.d/$domain.d/owncloud.conf |
56 | 56 | sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" /etc/nginx/conf.d/$domain.d/owncloud.conf |
57 | 57 | sudo sed -i "s@NAMETOCHANGE@owncloud@g" /etc/nginx/conf.d/$domain.d/owncloud.conf |
58 | 58 | sudo sed -i "s@NAMETOCHANGE@owncloud@g" /etc/php5/fpm/pool.d/owncloud.conf |
59 | +sudo sed -i "s@NAMETOCHANGE@owncloud@g" ../hooks/post_user_create | |
60 | + | |
61 | +# Add hooks | |
62 | +sudo yunohost hook add post_user_create ../hooks/post_user_create "50-owncloud" | |
59 | 63 | |
60 | 64 | # Set permissions to owncloud directories and /home directories + add Home external storage |
61 | 65 | for i in $(ls /home) |
scripts/remove
... | ... | @@ -8,6 +8,7 @@ domain=$(sudo yunohost app setting owncloud domain) |
8 | 8 | mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" |
9 | 9 | sudo rm -rf /var/www/owncloud |
10 | 10 | sudo rm -rf /home/yunohost.app/owncloud |
11 | +sudo rm -f /usr/share/yunohost/hooks/post_user_create/50-owncloud | |
11 | 12 | sudo rm -f /etc/nginx/conf.d/$domain.d/owncloud.conf |
12 | 13 | sudo rm -f /etc/php5/fpm/pool.d/owncloud.conf |
13 | 14 | sudo service php5-fpm restart |