-
-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/usr/bin/env bash | ||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) | ||
# Copyright (c) 2021-2024 tteck | ||
# Author: tteck (tteckster) | ||
# License: MIT | ||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE | ||
|
||
function header_info { | ||
clear | ||
cat <<"EOF" | ||
________ ______ _____ | ||
/ ____/ / / / __ \/ ___/ | ||
/ / / / / / /_/ /\__ \ | ||
/ /___/ /_/ / ____/___/ / | ||
\____/\____/_/ /____/ | ||
EOF | ||
} | ||
header_info | ||
echo -e "Loading..." | ||
APP="cups" | ||
var_disk="8" | ||
var_cpu="1" | ||
var_ram="512" | ||
var_os="debian" | ||
var_version="12" | ||
variables | ||
color | ||
catch_errors | ||
|
||
function default_settings() { | ||
CT_TYPE="1" | ||
PW="" | ||
CT_ID=$NEXTID | ||
HN=$NSAPP | ||
DISK_SIZE="$var_disk" | ||
CORE_COUNT="$var_cpu" | ||
RAM_SIZE="$var_ram" | ||
BRG="vmbr0" | ||
NET="dhcp" | ||
GATE="" | ||
APT_CACHER="" | ||
APT_CACHER_IP="" | ||
DISABLEIP6="no" | ||
MTU="" | ||
SD="" | ||
NS="" | ||
MAC="" | ||
VLAN="" | ||
SSH="no" | ||
VERB="no" | ||
echo_default | ||
} | ||
|
||
function update_script() { | ||
header_info | ||
check_container_storage | ||
check_container_resources | ||
if [[ ! -d /etc/cups ]]; then msg_error "No ${APP} Installation Found!"; exit; fi | ||
msg_info "Stopping ${APP} Service" | ||
systemctl stop cups | ||
msg_ok "Stopped ${APP} Service" | ||
|
||
msg_info "Updating..." | ||
apt install --only-upgrade cups &>/dev/null | ||
msg_ok "Update Successfully" | ||
|
||
msg_info "Starting ${APP}" | ||
systemctl start cups | ||
msg_ok "Started ${APP}" | ||
msg_ok "Updated Successfully" | ||
exit | ||
} | ||
|
||
start | ||
build_container | ||
description | ||
|
||
msg_ok "Completed Successfully!\n" | ||
echo -e "${APP} should be reachable by going to the following URL. | ||
${BL}http://${IP}:631${CL}\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2021-2024 tteck | ||
# Author: tteck (tteckster) | ||
# 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 | ||
$STD apt-get install -y sudo | ||
$STD apt-get install -y mc | ||
msg_ok "Installed Dependencies" | ||
|
||
msg_info "Install CUPS" | ||
$STD apt-get install -y cups | ||
msg_ok "Installed CUPS" | ||
|
||
msg_info "Add lpadmin to root group" | ||
$STD usermod -aG lpadmin root | ||
msg_ok "Added lpadmin to root group" | ||
|
||
msg_info "Starting Service" | ||
systemctl enable -q --now cups | ||
msg_ok "Started Service" | ||
|
||
msg_info "Allow remote administration" | ||
$STD cupsctl --remote-admin --remote-any --share-printers | ||
msg_ok "Allowed remote administration" | ||
|
||
motd_ssh | ||
customize | ||
|
||
msg_info "Cleaning up" | ||
$STD apt-get -y autoremove | ||
$STD apt-get -y autoclean | ||
msg_ok "Cleaned" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "CUPS", | ||
"slug": "CUPS", | ||
"categories": [ | ||
0 | ||
], | ||
"date_created": "2024-12-02", | ||
"type": "ct", | ||
"updateable": false, | ||
"privileged": false, | ||
"interface_port": 631, | ||
"documentation": null, | ||
"website": "https://www.cups.org/", | ||
"logo": "https://www.cups.org/apple-touch-icon.png", | ||
"description": "The standards-based, open source printing system developed by Apple for iOS®, iPadOS®, and macOS®. CUPS uses IPP Everywhere™ to support printing to local and network printers.", | ||
"install_methods": [ | ||
{ | ||
"type": "default", | ||
"script": "ct/cups.sh", | ||
"resources": { | ||
"cpu": 1, | ||
"ram": 512, | ||
"hdd": 8, | ||
"os": "debian", | ||
"version": "12" | ||
} | ||
} | ||
], | ||
"default_credentials": { | ||
"username": "root", | ||
"password": null | ||
}, | ||
"notes": [] | ||
} |