Skip to content

Commit 535589c

Browse files
LimeSurvey (#8364)
* 'Add new script' * replace cat with nano to edit files * revert: use cat instead of nano --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Tobias <[email protected]>
1 parent 2610ef5 commit 535589c

File tree

4 files changed

+162
-0
lines changed

4 files changed

+162
-0
lines changed

ct/headers/limesurvey

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ _ _____
2+
/ / (_)___ ___ ___ / ___/__ ________ _____ __ __
3+
/ / / / __ `__ \/ _ \\__ \/ / / / ___/ | / / _ \/ / / /
4+
/ /___/ / / / / / / __/__/ / /_/ / / | |/ / __/ /_/ /
5+
/_____/_/_/ /_/ /_/\___/____/\__,_/_/ |___/\___/\__, /
6+
/____/

ct/limesurvey.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://community.limesurvey.org/
7+
8+
APP="LimeSurvey"
9+
var_tags="${var_tags:-os}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-512}"
12+
var_disk="${var_disk:-2}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/limesurvey ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
msg_warn "Application is updated via Web Interface"
32+
exit
33+
}
34+
35+
start
36+
build_container
37+
description
38+
39+
msg_ok "Completed Successfully!\n"
40+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
41+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
42+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "LimeSurvey",
3+
"slug": "limesurvey",
4+
"categories": [
5+
25
6+
],
7+
"date_created": "2025-09-22",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": "https://www.limesurvey.org/manual/LimeSurvey_Manual",
13+
"config_path": "",
14+
"website": "https://community.limesurvey.org/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/limesurvey.webp",
16+
"description": "LimeSurvey is the simple, quick and anonymous online survey tool that's bursting with juicy insights. Calling students, professionals and enterprises: design a survey and get the best insights, it’s free and as easy as squeezing a lime. Make a free online survey now!",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/limesurvey.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 512,
24+
"hdd": 2,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "You will need to input database credentials into LimeSurvey installer. Use `cat ~/limesurvey.creds` inside LXC.",
37+
"type": "info"
38+
}
39+
]
40+
}

install/limesurvey-install.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://community.limesurvey.org/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="imap,ldap,mysql" setup_php
17+
setup_mariadb
18+
19+
msg_info "Configuring MariaDB Database"
20+
DB_NAME=limesurvey_db
21+
DB_USER=limesurvey
22+
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
23+
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
24+
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
25+
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
26+
{
27+
echo "LimeSurvey-Credentials"
28+
echo "LimeSurvey Database User: $DB_USER"
29+
echo "LimeSurvey Database Password: $DB_PASS"
30+
echo "LimeSurvey Database Name: $DB_NAME"
31+
} >>~/limesurvey.creds
32+
msg_ok "Configured MariaDB Database"
33+
34+
msg_info "Setting up LimeSurvey"
35+
temp_file=$(mktemp)
36+
RELEASE=$(curl -s https://community.limesurvey.org/downloads/ | grep -oE 'https://download\.limesurvey\.org/latest-master/limesurvey[0-9.+]+\.zip' | head -n1)
37+
curl -fsSL "$RELEASE" -o "$temp_file"
38+
unzip -q "$temp_file" -d /opt
39+
40+
cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
41+
<VirtualHost *:80>
42+
ServerAdmin webmaster@localhost
43+
DocumentRoot /opt/limesurvey
44+
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml
45+
Options +ExecCGI
46+
47+
<Directory /opt/limesurvey/>
48+
Options FollowSymLinks
49+
Require all granted
50+
AllowOverride All
51+
</Directory>
52+
53+
<Location />
54+
Require all granted
55+
</Location>
56+
57+
ErrorLog /var/log/apache2/error.log
58+
CustomLog /var/log/apache2/access.log combined
59+
</VirtualHost>
60+
EOF
61+
chown -R www-data:www-data "/opt/limesurvey"
62+
chmod -R 750 "/opt/limesurvey"
63+
systemctl reload apache2
64+
msg_ok "Set up LimeSurvey"
65+
66+
motd_ssh
67+
customize
68+
69+
msg_info "Cleaning up"
70+
rm -rf "$temp_file"
71+
$STD apt -y autoremove
72+
$STD apt -y autoclean
73+
$STD apt -y clean
74+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)