2024-12-09 23:08:39 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
dir,
|
|
|
|
}:
|
2024-12-04 20:09:32 +00:00
|
|
|
pkgs.writeShellScriptBin "pelican-install" ''
|
|
|
|
DIR=${dir}
|
|
|
|
|
|
|
|
echo "Installing Pelican panel to $DIR ..."
|
|
|
|
if [ -d $DIR ]; then
|
|
|
|
echo "Directory $DIR already exists, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "Creating directory ..."
|
|
|
|
mkdir -p $DIR
|
|
|
|
cd $DIR
|
|
|
|
|
|
|
|
echo "Downloading Pelican panel ..."
|
|
|
|
curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | tar -xzv
|
|
|
|
echo "Installing Pelican panel using composer ..."
|
|
|
|
yes | composer install --no-dev --optimize-autoloader
|
|
|
|
|
|
|
|
echo "Setting up the environment ..."
|
|
|
|
yes "" | php artisan p:environment:setup
|
|
|
|
|
|
|
|
echo "Setting permissions ..."
|
|
|
|
chmod -R 755 storage/* bootstrap/cache/
|
2024-12-09 23:08:39 +00:00
|
|
|
chown -R nginx:acme $DIR
|
2024-12-04 20:09:32 +00:00
|
|
|
|
|
|
|
echo "Pelican panel installed successfully"
|
2024-12-09 23:08:39 +00:00
|
|
|
''
|