-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopsi_ins.sh
48 lines (45 loc) · 1.3 KB
/
opsi_ins.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
#
# Script-Name : $@.sh
# Version : 0.01
# Autor : Tobias Kern
# Datum : $DATE
# Lizenz : GPLv3
# Depends :
# Use :
#
# Example: opsi_ins.sh $#DOMAIN $TESTPW
#
# Sources:
# http://download.uib.de/opsi_stable/doc/opsi-getting-started-stable-de.pdf
# Description:
###########################################################################################
## Some Info and so one.
##
###########################################################################################
# Name of your script.
SCRIPTNAME=$(basename $0.sh)
# exit code without any error
EXIT_SUCCESS=0
# exit code I/O failure
EXIT_FAILURE=1
# exit code error if known
EXIT_ERROR=2
# unknown ERROR
EXIT_BUG=10
# Variable for optionsswitch
#OPTFILE=""
fbname=$(basename "$1".txt)
# simple help funktion , in this file because this function is only for the script itself. All others functions put in opsi_func.sh please.
function usage {
echo "Usage: $SCRIPTNAME [-h] [-v] [-o arg] file ..." >&2
[[ $# -eq 1 ]] && exit $1 || exit $EXIT_FAILURE
}
. ./pre_opsi_ins.sh execute opsi_ins.sh
. ./opsi_func.sh execute opsi_ins.sh
onlyroot
JREVERSION="$(java -version)"
opsi-admin -d task setPcpatchPassword
echo "You have JAVA Version: $JREVERSION"
echo "user update-alternatives --config java if you have any error."
sleep 3