<?php
header('Content-Type: text/plain');
echo "Deleting old app...\n";
echo shell_exec('cloudlinux-selector destroy --json --interpreter nodejs --app-root widvw.xyz/peak 2>&1');
echo "\nCreating new app...\n";
echo shell_exec('cloudlinux-selector create --json --interpreter nodejs --version 20 --app-root widvw.xyz --domain widvw.xyz --startup-file server.js 2>&1');
echo "\nInstalling modules...\n";
echo shell_exec('cloudlinux-selector install-modules --json --interpreter nodejs --app-root widvw.xyz 2>&1');
echo "\nStarting app...\n";
echo shell_exec('cloudlinux-selector start --json --interpreter nodejs --app-root widvw.xyz 2>&1');
echo "\nDone!\n";
