From f9c2bad137379360337f7088166744ac84e18dfe Mon Sep 17 00:00:00 2001 From: plopoyop Date: Sat, 20 Sep 2014 10:56:59 +0200 Subject: [PATCH] Fix installed path --- hooks/post_app_addaccess | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hooks/post_app_addaccess b/hooks/post_app_addaccess index dffa8b9..bf78f88 100755 --- a/hooks/post_app_addaccess +++ b/hooks/post_app_addaccess @@ -2,6 +2,7 @@ app=$1 new_users=$2 +app_path=/var/www/freshrss if [[ "freshrss" = "$app" ]]; @@ -21,7 +22,7 @@ then for myuser in $(echo "$new_users" | sed "s/,/ /g") do #copy sql - sudo cp /var/www/freshrss/app/SQL/install_ynh.sql /tmp/$myuser-install.sql + sudo cp $app_path/app/SQL/install_ynh.sql /tmp/$myuser-install.sql #change username in sql sudo sed -i "s/YnoUser/$myuser/g" /tmp/$myuser-install.sql @@ -30,11 +31,11 @@ then #remove temp sql sudo rm /tmp/$myuser-install.sql #copy default conf - sudo cp /var/www/freshrss/data/user.php.dist /var/www/freshrss/data/$myuser\_user.php + sudo cp $app_path/data/user.php.dist $app_path/data/$myuser\_user.php #change username - sudo sed -i "s/YnoUser/$myuser/g" $final_path/data/$myuser\_user.php + sudo sed -i "s/YnoUser/$myuser/g" $app_path/data/$myuser\_user.php #add wallabag sharing - sudo sed -i "s@sharingArrayYnh@$sharingWallabag@g" $final_path/data/$myuser\_user.php + sudo sed -i "s@sharingArrayYnh@$sharingWallabag@g" $app_path/data/$myuser\_user.php done fi \ No newline at end of file