remove user creation during install

This commit is contained in:
Boudewijn 2025-03-03 14:09:06 +01:00
parent 6eeb04a332
commit 8b69328c85

View file

@ -46,8 +46,9 @@ chown "$app:www-data" "$install_dir/.env"
# Inject CreateUser.php into app/Console/Commands/ to extend the upstream version with this functionality
# Using this, we can create the user with the credentials provided
ynh_config_add --template=CreateUser.php --destination="$install_dir/app/Console/Commands/CreateUser.php"
ynh_config_add --template=CreateUserTest.php --destination="$install_dir/app/Console/Commands/CreateUserTest.php"
#ynh_config_add --template=CreateUser.php --destination="$install_dir/app/Console/Commands/CreateUser.php"
#ynh_config_add --template=CreateUserTest.php --destination="$install_dir/app/Console/Commands/CreateUserTest.php"
# Scratch that. CreateUser crashes without the test file, the test file depends on class testcases. I'll look for a solution that does not pull in a boatload of dependencies.
#=================================================
# SYSTEM CONFIGURATION
@ -101,10 +102,13 @@ pushd "$install_dir"
"php$php_version" artisan migrate:fresh --seed -n --force
"php$php_version" artisan config:clear -n
"php$php_version" artisan config:cache -n
"php$php_version" artisan app:create-user "$user" "$email" "$password"
# "php$php_version" artisan app:create-user "$user" "$email" "$password"
popd
# Try to push create user into artisan tinker
# copy/paste from lychee install, for what it's worth...
# file was touched by artisan, rehash it
ynh_store_file_checksum "$install_dir/.env"