mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	Updated contributor docs (#4518)
This commit is contained in:
		
							
								
								
									
										14
									
								
								.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md
									
									
									
									
										vendored
									
									
								
							@@ -108,13 +108,13 @@ Example:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
APP="SnipeIT"
 | 
			
		||||
var_tags="asset-management;foss"
 | 
			
		||||
var_cpu="2"
 | 
			
		||||
var_ram="2048"
 | 
			
		||||
var_disk="4"
 | 
			
		||||
var_os="debian"
 | 
			
		||||
var_version="12"
 | 
			
		||||
var_unprivileged="1"
 | 
			
		||||
var_tags="${var_tags:-asset-management;foss}"
 | 
			
		||||
var_cpu="${var_cpu:-2}"
 | 
			
		||||
var_ram="${var_ram:-2048}"
 | 
			
		||||
var_disk="${var_disk:-4}"
 | 
			
		||||
var_os="${var_os:-debian}"
 | 
			
		||||
var_version="${var_version:-12}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 2.2 **📋 App output & base settings**
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh
									
									
									
									
										vendored
									
									
								
							@@ -6,22 +6,22 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
 | 
			
		||||
# Source: [SOURCE_URL]
 | 
			
		||||
 | 
			
		||||
# App Default Values
 | 
			
		||||
APP="[APP_NAME]"
 | 
			
		||||
# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole"
 | 
			
		||||
var_tags="[TAGS]"
 | 
			
		||||
APP="[APP_NAME]"
 | 
			
		||||
# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp)
 | 
			
		||||
var_cpu="[CPU]"
 | 
			
		||||
var_tags="${var_tags:-[TAGS]}"
 | 
			
		||||
# Number of cores (1-X) (e.g. 4) - default are 2
 | 
			
		||||
var_ram="[RAM]"
 | 
			
		||||
var_cpu="${var_cpu:-[CPU]}"
 | 
			
		||||
# Amount of used RAM in MB (e.g. 2048 or 4096)
 | 
			
		||||
var_disk="[DISK]"
 | 
			
		||||
var_ram="${var_ram:-[RAM]}"
 | 
			
		||||
# Amount of used disk space in GB (e.g. 4 or 10)
 | 
			
		||||
var_os="[OS]"
 | 
			
		||||
var_disk="${var_disk:-[DISK]}"
 | 
			
		||||
# Default OS (e.g. debian, ubuntu, alpine)
 | 
			
		||||
var_version="[VERSION]"
 | 
			
		||||
var_os="${var_os:-[OS]}"
 | 
			
		||||
# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine)
 | 
			
		||||
var_unprivileged="[UNPRIVILEGED]"
 | 
			
		||||
var_version="${var_version:-[VERSION]}"
 | 
			
		||||
# 1 = unprivileged container, 0 = privileged container
 | 
			
		||||
var_unprivileged="${var_unprivileged:-[UNPRIVILEGED]}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
 
 | 
			
		||||
@@ -152,7 +152,7 @@ Example for a git release:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
 | 
			
		||||
curl -fsSL "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 5.2 **Save the version for update checks**
 | 
			
		||||
@@ -163,7 +163,7 @@ wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
 | 
			
		||||
Example:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
echo "${RELEASE}" >"/opt/AppName_version.txt"
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
# Source: [SOURCE_URL]
 | 
			
		||||
 | 
			
		||||
# Import Functions und Setup
 | 
			
		||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
@@ -35,11 +35,9 @@ $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH
 | 
			
		||||
  echo "Database User: $DB_USER"
 | 
			
		||||
  echo "Database Password: $DB_PASS"
 | 
			
		||||
  echo "Database Name: $DB_NAME"
 | 
			
		||||
} >> ~/$APP_NAME.creds
 | 
			
		||||
} >>~/"$APP_NAME".creds
 | 
			
		||||
msg_ok "Set up Database"
 | 
			
		||||
 | 
			
		||||
# Temp
 | 
			
		||||
 | 
			
		||||
# Setup App
 | 
			
		||||
msg_info "Setup ${APPLICATION}"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/[REPO]/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
@@ -49,12 +47,12 @@ mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}"
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
 | 
			
		||||
msg_ok "Setup ${APPLICATION}"
 | 
			
		||||
 | 
			
		||||
# Creating Service (if needed)
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
 | 
			
		||||
cat <<EOF >/etc/systemd/system/"${APPLICATION}".service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=${APPLICATION} Service
 | 
			
		||||
After=network.target
 | 
			
		||||
@@ -66,7 +64,7 @@ Restart=always
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable -q --now ${APPLICATION}
 | 
			
		||||
systemctl enable -q --now "${APPLICATION}"
 | 
			
		||||
msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
@@ -74,7 +72,7 @@ customize
 | 
			
		||||
 | 
			
		||||
# Cleanup
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -f ${RELEASE}.zip
 | 
			
		||||
rm -f "${RELEASE}".zip
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
		Reference in New Issue
	
	Block a user