diff --git a/scripts/install b/scripts/install index c339983..794a7f9 100755 --- a/scripts/install +++ b/scripts/install @@ -157,6 +157,9 @@ chown -R "$app" "$final_path" ynh_exec_as $app $final_path/venv/bin/pip install -r "$final_path/requirements.txt" ) +# we use this virtualenv archivebox for further commands now +archivebox_cmd="$final_path/venv/bin/archivebox" + #================================================= # CREATE DATA DIRECTORY #================================================= @@ -177,10 +180,10 @@ chown -R $app:www-data "$datadir" # INITIALIZE ARCHIVEBOX #================================================= ynh_script_progression --message="Initializing Archivebox" --weight=1 -cd $datadir && ynh_exec_as $app archivebox init +cd $datadir && ynh_exec_as $app $archivebox_cmd init ynh_script_progression --message="Checking if admin superuser already exists: $admin" --weight=1 -USER_EXISTS=$(cd $datadir && ynh_exec_as $app archivebox manage shell -c "from django.contrib.auth.models import User; print(User.objects.filter(username='$admin').count())") +USER_EXISTS=$(cd $datadir && ynh_exec_as $app $archivebox_cmd manage shell -c "from django.contrib.auth.models import User; print(User.objects.filter(username='$admin').count())") ynh_script_progression --message="Found users: $USER_EXISTS" --weight=1 if [ $USER_EXISTS -eq 1 ] @@ -189,7 +192,7 @@ then ynh_exec_as $app /usr/bin/expect<