File tree Expand file tree Collapse file tree 4 files changed +62
-0
lines changed
Expand file tree Collapse file tree 4 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # nothing to compile
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # This is an example to upgrade the chroot packages
3+ # The basic calling convention of these scripts is:
4+ # ./script <working_dir> <output_file>
5+
6+ output_file=" $1 "
7+
8+ exec & >> " ${output_file} "
9+
10+ bin/dj_run_chroot " apt-get update"
11+ bin/dj_run_chroot " apt-get full-upgrade -y"
12+
13+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # nothing to compile
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # This is the default script to retrieve a the configuration of both
3+ # software & hardware of the judgehost. The basic
4+ # calling convention of these scripts is:
5+ # ./script <working_dir> <output_file>
6+
7+ output_file=" $1 "
8+
9+ # Source - https://stackoverflow.com/a
10+ # Posted by fjarlq, modified by community. See post 'Timeline' for change history
11+ # Retrieved 2025-11-15, License - CC BY-SA 4.0
12+
13+ if [ " ${SHELL#* " bash" } " != " ${SHELL} " ]; then
14+ exec & >> " ${output_file} "
15+ else
16+ # We can't use &>> as it's not POSIX,
17+ # this does introduce a racecondition
18+ exec 1>> " ${output_file} "
19+ exec 2>> " ${output_file} "
20+ fi
21+
22+ # Generic linux/distro information
23+ uname -a
24+ cat /etc/os-release
25+
26+ # Information about the php version
27+ php -v
28+
29+ # Generic hardware information
30+ lsusb
31+ lspci
32+ lscpu
33+ cat /proc/cpuinfo
34+ free -h
35+ cat /proc/meminfo
36+
37+ if [ command -v hwinfo ]; then
38+ hwinfo --short
39+ fi
40+
41+ if [ command -v inxi ]; then
42+ inxi -Fx
43+ fi
44+
45+ exit 0
You can’t perform that action at this time.
0 commit comments