summaryrefslogtreecommitdiff
path: root/src/pmdas/sample/Install
blob: fd6bee6724e06ef3ce904f1a3e90ac93b9227f50 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#! /bin/sh
#
# Copyright (c) 1997 Silicon Graphics, Inc.  All Rights Reserved.
# 
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# Install the sample PMDA and/or PMNS
#

. $PCP_DIR/etc/pcp.env
. $PCP_SHARE_DIR/lib/pmdaproc.sh

iam=sample
forced_restart=false
pmda_interface=2

# Do it for sample
#
pmdaSetup

echo "======================"
echo "= sample daemon PMDA ="
echo "======================"

daemon_opt=true		# can install as daemon
dso_opt=false
pipe_opt=true		# supports pipe IPC
socket_opt=true		# supports socket IPC
socket_inet_def=2077	# default TCP port for Internet socket IPC

pmdaInstall

# The name of the PMDA for sampledso
#
iam=sampledso

# Do it for sampledso ... no pmdaSetup
#

echo "======================"
echo "= sampledso DSO PMDA ="
echo "======================"

domain=30
SYMDOM=SAMPLEDSO
sed -e 's/sample/sampledso/' -e 's/SAMPLE/SAMPLEDSO/' <pmns >$tmp/pmns
pmns_source=$tmp/pmns
pmns_name=sampledso

if $do_pmda
then
    sed -e 's/sample/sampledso/' -e 's/SAMPLE/SAMPLEDSO/' <help >dsohelp
    help_source=dsohelp
fi

dso_opt=true
daemon_opt=false
dso_suffix=so
[ "$PCP_PLATFORM" = "mingw" ] && dso_suffix=dll
[ "$PCP_PLATFORM" = "darwin" ] && dso_suffix=dylib
dso_name=$PCP_PMDAS_DIR/sample/pmda_sample.$dso_suffix
dso_entry=sample_init

pmdaInstall

exit 0