diff --git a/scripts/install b/scripts/install index 35a496d..54574ad 100755 --- a/scripts/install +++ b/scripts/install @@ -82,8 +82,8 @@ sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf # setup application config sudo cp ../conf/.env $final_path/.env -cd $final_path && /usr/bin/php7.0 artisan -n key:generate --force -cd $final_path && /usr/bin/php7.0 artisan config:clear +cd $final_path && sudo /usr/bin/php7.0 artisan -n key:generate --force +cd $final_path && sudo /usr/bin/php7.0 artisan config:clear sudo sed -i "s/yunouser/$dbuser/g" $final_path/.env sudo sed -i "s/yunopass/$dbpass/g" $final_path/.env @@ -100,12 +100,12 @@ cd $final_path && sudo_path "$nodejs_path/pnpm" install -g bower gulp cd $final_path && sudo_path "$nodejs_path/bower" install -f --allow-root # setup application config -cd $final_path && /usr/bin/php7.0 artisan -q migrate --force -cd $final_path && /usr/bin/php7.0 artisan -q storage:link -cd $final_path && /usr/bin/php7.0 artisan -q optimize -cd $final_path && /usr/bin/php7.0 artisan -q db:seed --class ActivityTypesTableSeeder --force -cd $final_path && /usr/bin/php7.0 artisan -q db:seed --class CountriesSeederTable --force -cd $final_path && /usr/bin/php7.0 artisan -q db:seed --class CreateUser --force +cd $final_path && sudo /usr/bin/php7.0 artisan -q migrate --force +cd $final_path && sudo /usr/bin/php7.0 artisan -q storage:link +cd $final_path && sudo /usr/bin/php7.0 artisan -q optimize +cd $final_path && sudo /usr/bin/php7.0 artisan -q db:seed --class ActivityTypesTableSeeder --force +cd $final_path && sudo /usr/bin/php7.0 artisan -q db:seed --class CountriesSeederTable --force +cd $final_path && sudo /usr/bin/php7.0 artisan -q db:seed --class CreateUser --force # create a cronjob to run the scheduler echo "* * * * * www-data cd $final_path && /usr/bin/php7.0 $final_path/artisan schedule:run >/dev/null 2>&1" > /tmp/cron$app