@@ -5,10 +5,44 @@ log() {
55 echo " [opencode-cloud] $* "
66}
77
8+ read_opencode_cloud_version () {
9+ local version_file=" /etc/opencode-cloud-version"
10+ local version
11+
12+ if [ -r " ${version_file} " ]; then
13+ version=" $( head -n 1 " ${version_file} " 2> /dev/null | tr -d " \r\n" ) "
14+ else
15+ version=" "
16+ fi
17+
18+ if [ -z " ${version} " ]; then
19+ printf " dev"
20+ else
21+ printf " %s" " ${version} "
22+ fi
23+ }
24+
25+ print_welcome_banner () {
26+ local version
27+ version=" $( read_opencode_cloud_version) "
28+
29+ log " ----------------------------------------------------------------------"
30+ log " Welcome to opencode-cloud-sandbox"
31+ log " You are running opencode-cloud v${version} "
32+ log " For questions, problems, and feature requests, file an issue:"
33+ log " https://github.com/pRizz/opencode-cloud/issues"
34+ log " opencode-cloud runs opencode in a Docker sandbox; use occ/opencode-cloud CLI to manage users, mounts, and updates."
35+ log " Quick start: occ user add <username> | occ status | occ logs -f"
36+ log " Docs: https://github.com/pRizz/opencode-cloud#readme"
37+ log " ----------------------------------------------------------------------"
38+ }
39+
840OPENCODE_PORT=" ${OPENCODE_PORT:- ${PORT:- 3000} } "
941OPENCODE_HOST=" ${OPENCODE_HOST:- 0.0.0.0} "
1042export OPENCODE_PORT OPENCODE_HOST
1143
44+ print_welcome_banner
45+
1246detect_droplet () {
1347 local hint=" ${OPENCODE_CLOUD_ENV:- } "
1448 if [ -n " ${hint} " ]; then
@@ -63,13 +97,6 @@ if [ -n "${non_persistent_paths}" ]; then
6397 log " ================================================================="
6498fi
6599
66- log " ----------------------------------------------------------------------"
67- log " If you created this container via opencode-cloud CLI, add users with:"
68- log " occ user add (or: opencode-cloud user add)"
69- log " Learn more: occ --help (or: opencode-cloud --help)"
70- log " Docs: https://github.com/pRizz/opencode-cloud#readme"
71- log " ----------------------------------------------------------------------"
72-
73100if [ " ${USE_SYSTEMD:- } " = " 1" ]; then
74101 exec /sbin/init
75102else
0 commit comments