Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot]
470d7b7312 Update CHANGELOG.md 2025-01-21 08:03:11 +00:00
bvdberg01
c6c026e221
New script: ProjectSend (#1616)
Some checks are pending
Auto Update .app-headers / update-app-headers (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions
* New Script: ProjectSend

* Update projectsend.json

* Update projectsend-install.sh
2025-01-21 09:02:57 +01:00
community-scripts-pr-app[bot]
4dcf0dc0b8
Update CHANGELOG.md (#1617)
Some checks are pending
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-20 18:04:18 +01:00
4 changed files with 210 additions and 0 deletions

View File

@ -17,6 +17,14 @@ All LXC instances created using this repository come pre-installed with Midnight
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
## 2025-01-21
### Changed
### ✨ New Scripts
- New script: ProjectSend [@bvdberg01](https://github.com/bvdberg01) ([#1616](https://github.com/community-scripts/ProxmoxVE/pull/1616))
## 2025-01-20
### Changed
@ -40,6 +48,7 @@ Do not break established syntax in this file, as it is automatically updated by
### 🧰 Maintenance
- [core] Update build.func: Add defaults to Advanced mode [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1548](https://github.com/community-scripts/ProxmoxVE/pull/1548))
- Update build.func: Fix Advanced Tags (Remove all if empty / overwrite if default cleared) [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1612](https://github.com/community-scripts/ProxmoxVE/pull/1612))
- Add new Check for LXC MaxKeys by @cricalix [@MickLesk](https://github.com/MickLesk) ([#1602](https://github.com/community-scripts/ProxmoxVE/pull/1602))

71
ct/projectsend.sh Normal file
View File

@ -0,0 +1,71 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: bvdberg01
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.projectsend.org/
# App Default Values
APP="ProjectSend"
var_tags="media"
var_cpu="1"
var_ram="1024"
var_disk="8"
var_os="debian"
var_version="12"
var_unprivileged="1"
# App Output & Base Settings
header_info "$APP"
base_settings
# Core
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/projectsend ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/projectsend/projectsend/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Service"
systemctl stop apache2
msg_ok "Stopped Service"
msg_info "Updating ${APP} to v${RELEASE}"
cd /opt
wget -q "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip"
unzip -o -q "projectsend-r${RELEASE}.zip" -d projectsend
chown -R www-data:www-data /opt/projectsend
chmod -R 775 /opt/projectsend
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated $APP to v${RELEASE}"
msg_info "Starting Service"
systemctl start apache2
msg_ok "Started Service"
msg_info "Cleaning up"
rm -rf "/opt/projectsend-r${RELEASE}.zip"
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@ -0,0 +1,91 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: bvdberg01
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
mariadb-server \
apache2 \
libapache2-mod-php \
php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip}
msg_ok "Installed Dependencies"
msg_info "Setting up MariaDB"
DB_NAME=projectsend
DB_USER=projectsend
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "projectsend-Credentials"
echo "projectsend Database User: $DB_USER"
echo "projectsend Database Password: $DB_PASS"
echo "projectsend Database Name: $DB_NAME"
} >> ~/projectsend.creds
msg_ok "Set up MariaDB"
msg_info "Installing projectsend"
RELEASE=$(curl -s https://api.github.com/repos/projectsend/projectsend/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cd /opt
wget -q "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip"
mkdir projectsend
unzip -q "projectsend-r${RELEASE}.zip" -d projectsend
mv /opt/projectsend/includes/sys.config.sample.php /opt/projectsend/includes/sys.config.php
chown -R www-data:www-data /opt/projectsend
chmod -R 775 /opt/projectsend
chmod 644 /opt/projectsend/includes/sys.config.php
sed -i -e "s/\(define('DB_NAME', \).*/\1'$DB_NAME');/" \
-e "s/\(define('DB_USER', \).*/\1'$DB_USER');/" \
-e "s/\(define('DB_PASSWORD', \).*/\1'$DB_PASS');/" \
/opt/projectsend/includes/sys.config.php
sed -i -e "s/^\(memory_limit = \).*/\1 256M/" \
-e "s/^\(post_max_size = \).*/\1 256M/" \
-e "s/^\(upload_max_filesize = \).*/\1 256M/" \
-e "s/^\(max_execution_time = \).*/\1 300/" \
/etc/php/8.2/apache2/php.ini
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed projectsend"
msg_info "Creating Service"
cat <<EOF >/etc/apache2/sites-available/projectsend.conf
<VirtualHost *:80>
ServerName projectsend
DocumentRoot /opt/projectsend
<Directory /opt/projectsend>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/projectsend_error.log
CustomLog /var/log/apache2/projectsend_access.log combined
</VirtualHost>
EOF
$STD a2ensite projectsend
$STD a2enmod rewrite
$STD a2dissite 000-default.conf
$STD systemctl reload apache2
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf "/opt/projectsend-r${RELEASE}.zip"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

39
json/projectsend.json Normal file
View File

@ -0,0 +1,39 @@
{
"name": "ProjectSend",
"slug": "projectsend",
"categories": [
12
],
"date_created": "2025-01-20",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://docs.projectsend.org/",
"website": "https://projectsend.org/",
"logo": "https://camo.githubusercontent.com/378a455e1cf6f36c5427b2bdfd78b0defd829be9b8c6b073f83931693e1665d5/68747470733a2f2f7777772e70726f6a65637473656e642e6f72672f70726f6a65637473656e642d6c6f676f2d6e65772e706e67",
"description": "ProjectSend is a free, open source software that lets you share files with your clients, focused on ease of use and privacy. It supports clients groups, system users roles, statistics, multiple languages, detailed logs... and much more!",
"install_methods": [
{
"type": "default",
"script": "ct/projectsend.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 8,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "After running the update script, logging in as a system user in ProjectSend is necessary to upgrade the database.",
"type": "info"
}
]
}