mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-07 16:29:18 +00:00
initial commit for test
This commit is contained in:
parent
c81e47349b
commit
50d6b1128e
@ -9,21 +9,21 @@ source <(curl -s https://raw.githubusercontent.com/quantumryuu/ProxmoxVE/build/m
|
|||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
____ ________ ______ __
|
_______ ______ ____________
|
||||||
/ _/___ _________ / _/ __ \/ ____/___/ /
|
/ ____(_)_______ / __/ /_ __ / _/ _/ _/
|
||||||
/ // __ \/ ___/ __ \ / // /_/ / / / __ /
|
/ /_ / / ___/ _ \/ /_/ / / / / / / / / / /
|
||||||
_/ // / / (__ ) /_/ // // _, _/ /___/ /_/ /
|
/ __/ / / / / __/ __/ / /_/ / _/ /_/ /_/ /
|
||||||
/___/_/ /_/____/ .___/___/_/ |_|\____/\__,_/
|
/_/ /_/_/ \___/_/ /_/\__, / /___/___/___/
|
||||||
/_/
|
/____/
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
header_info
|
header_info
|
||||||
echo -e "Loading..."
|
echo -e "Loading..."
|
||||||
APP="InspIRCd"
|
APP="Firefly III"
|
||||||
var_disk="2"
|
var_disk="2"
|
||||||
var_cpu="1"
|
var_cpu="1"
|
||||||
var_ram="512"
|
var_ram="1024"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="12"
|
var_version="12"
|
||||||
variables
|
variables
|
||||||
@ -95,4 +95,4 @@ description
|
|||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
${BL}http://${IP}:3000${CL} \n"
|
${BL}http://${IP}{CL} \n"
|
@ -17,38 +17,85 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
mc \
|
mc \
|
||||||
sudo
|
sudo \
|
||||||
|
apache2 \
|
||||||
|
php8.3 \
|
||||||
|
php8.3-cli \
|
||||||
|
libapache2-mod-php8.3 \
|
||||||
|
php8.3-{bcmath,intl,curl,zip,gd,xml,mbstring,mysql} \
|
||||||
|
mariadb-server \
|
||||||
|
composer
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up database"
|
||||||
|
DB_NAME=firefly
|
||||||
|
DB_USER=firefly
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
MYSQL_VERSION=$(mysql --version | grep -oP 'Distrib \K[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||||
|
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||||
|
mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
|
{
|
||||||
|
echo "Firefly-Credentials"
|
||||||
|
echo "Firefly Database User: $DB_USER"
|
||||||
|
echo "Firefly Database Password: $DB_PASS"
|
||||||
|
echo "Firefly Database Name: $DB_NAME"
|
||||||
|
} >> ~/firefly.creds
|
||||||
|
msg_ok "Set up database"
|
||||||
|
|
||||||
msg_info "Installing InspIRCd"
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/REPO/REPO/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
|
msg_info "Installing Firefly III (Patience)"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
cd /opt
|
cd /opt
|
||||||
wget -q https://github.com/REPO/REPO/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u1_amd64.deb
|
wget -q "https://github.com/firefly-iii/firefly-iii/releases/download/${RELEASE}/FireflyIII-${RELEASE}.tar.gz"
|
||||||
$STD apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y &>/dev/null
|
mkdir -p /opt/firefly-iii
|
||||||
cat <<EOF >/etc/inspircd/inspircd.conf
|
tar -xzf FireflyIII-${RELEASE}.tar.gz -C /opt/firefly-iii
|
||||||
<define name="networkDomain" value="helper-scripts.com">
|
chown -R www-data:www-data /opt/firefly-iii
|
||||||
<define name="networkName" value="Proxmox VE Helper-Scripts">
|
chmod -R 775 /opt/firefly-iii/storage
|
||||||
|
cd /opt/firefly-iii
|
||||||
<server
|
cp .env.example .env
|
||||||
name="irc.&networkDomain;"
|
sed -i "s/DB_HOST=.*/DB_HOST=localhost/" /opt/firefly-iii/.env
|
||||||
description="&networkName; IRC server"
|
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$DB_PASS/" /opt/firefly-iii/.env
|
||||||
network="&networkName;">
|
echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc
|
||||||
<admin
|
source ~/.bashrc
|
||||||
name="Admin"
|
composer install --no-dev --no-plugins --no-interaction
|
||||||
description="Supreme Overlord"
|
php artisan firefly-iii:upgrade-database
|
||||||
email="irc@&networkDomain;">
|
php artisan firefly-iii:correct-database
|
||||||
<bind address="" port="6667" type="clients">
|
php artisan firefly-iii:report-integrity
|
||||||
EOF
|
php artisan firefly-iii:laravel-passport-keys
|
||||||
|
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
msg_ok "Installed InspIRCd"
|
msg_ok "Installed Firefly III"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/firefly-iii.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /opt/firefly-iii/public/
|
||||||
|
|
||||||
|
<Directory /opt/firefly-iii/public>
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/error.log
|
||||||
|
CustomLog /var/log/apache2/access.log combined
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
$STD a2enmod php8.3
|
||||||
|
$STD a2enmod rewrite
|
||||||
|
$STD a2ensite firefly-iii.conf
|
||||||
|
$STD a2dissite 000-default.conf
|
||||||
|
$STD systemctl reload apache2
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf /opt/inspircd_${RELEASE}.deb12u1_amd64.deb
|
rm -rf /opt/FireflyIII-${RELEASE}.tar.gz
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
34
json/firefly.json
Normal file
34
json/firefly.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "Firefly III",
|
||||||
|
"slug": "firefly-iii",
|
||||||
|
"categories": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"date_created": "2024-11-30",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 80,
|
||||||
|
"documentation": "https://docs.firefly-iii.org/",
|
||||||
|
"website": "https://firefly-iii.org/",
|
||||||
|
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/develop/.github/assets/img/logo-small.png",
|
||||||
|
"description": "A free and open source personal finance manager",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "/ct/firefly-iii.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 1,
|
||||||
|
"ram": 1024,
|
||||||
|
"hdd": 2,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": []
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user