Skip to content

Commit 9ee6e23

Browse files
push-app-to-main[bot]tremor021MickLesk
authored
Stylus (#7588)
* 'Add new script' * Update stylus.sh * Update stylus-install.sh * Update stylus.json * fix stylus update * cleanup --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Slaviša Arežina <[email protected]> Co-authored-by: CanbiZ <[email protected]>
1 parent eceb1cd commit 9ee6e23

File tree

4 files changed

+141
-0
lines changed

4 files changed

+141
-0
lines changed

ct/headers/stylus

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/stylus.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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: luismco
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/mmastrac/stylus
7+
8+
APP="Stylus"
9+
var_tags="${var_tags:-network}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-2}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
var_fuse="${var_fuse:-1}"
17+
18+
header_info "$APP"
19+
variables
20+
color
21+
catch_errors
22+
23+
function update_script() {
24+
header_info
25+
check_container_storage
26+
check_container_resources
27+
28+
if [[ ! -d /opt/stylus ]]; then
29+
msg_error "No ${APP} Installation Found!"
30+
exit
31+
fi
32+
if check_for_gh_release "stylus" "mmastrac/stylus"; then
33+
msg_info "Stopping $APP"
34+
systemctl stop stylus
35+
msg_ok "Stopped $APP"
36+
37+
fetch_and_deploy_gh_release "stylus" "mmastrac/stylus" "singlefile" "latest" "/usr/bin/" "*_linux_amd64"
38+
39+
msg_info "Starting $APP"
40+
systemctl start stylus
41+
msg_ok "Started $APP"
42+
msg_ok "Update Successful"
43+
fi
44+
exit
45+
}
46+
47+
start
48+
build_container
49+
description
50+
51+
msg_ok "Completed Successfully!\n"
52+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
53+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
54+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

frontend/public/json/stylus.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Stylus",
3+
"slug": "stylus",
4+
"categories": [
5+
4
6+
],
7+
"date_created": "2025-09-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8000,
12+
"documentation": "https://mmastrac.github.io/stylus/",
13+
"website": "https://github.com/mmastrac/stylus",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/stylus.webp",
15+
"config_path": "/opt/stylus/config.yaml",
16+
"description": "Stylus (style + status) is a lightweight status page for infrastructure and networks. Configure a set of bash scripts that test the various parts of your infrastructure, set up visualizations with minimal configuration, and Stylus will generate you a dashboard for your system.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/stylus.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 1024,
24+
"hdd": 2,
25+
"os": "debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/stylus-install.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: luismco
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/mmastrac/stylus
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+
fetch_and_deploy_gh_release "stylus" "mmastrac/stylus" "singlefile" "latest" "/usr/bin/" "*_linux_amd64"
17+
18+
msg_info "Configuring Stylus"
19+
$STD stylus init /opt/stylus/
20+
msg_ok "Configured Stylus"
21+
22+
msg_info "Creating service"
23+
cat <<EOF >/etc/systemd/system/stylus.service
24+
[Unit]
25+
Description=Stylus Service
26+
After=network.target
27+
28+
[Service]
29+
Type=simple
30+
ExecStart=stylus run /opt/stylus/
31+
Restart=on-failure
32+
RestartSec=5
33+
34+
[Install]
35+
WantedBy=multi-user.target
36+
EOF
37+
systemctl enable -q --now stylus
38+
msg_ok "Created service"
39+
40+
motd_ssh
41+
customize
42+
43+
msg_info "Cleaning up"
44+
$STD apt-get -y autoremove
45+
$STD apt-get -y autoclean
46+
msg_ok "Cleaned up"

0 commit comments

Comments
 (0)