File: install

package info (click to toggle)
puppet-module-puppetlabs-apache 5.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,252 kB
  • sloc: ruby: 422; sh: 44; makefile: 6
file content (36 lines) | stat: -rwxr-xr-x 688 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

cd $ADTTMP

#simple puppet file for apache2 installation
cat <<EOF > init.pp
class { 'apache':  }
EOF

#be sure that apache2 is not installed
dpkg -s apache2 2>&1
if [ $? -eq 0 ] ; then
        echo "apache2 package already installed. abort."
        exit 1
fi
echo "apache2 not installed. good."

#do puppet magic
puppet apply --debug init.pp 2>&1

#apache2 should be installed
dpkg -s apache2 2>&1
if [ $? -ne 0 ] ; then
        echo "apache2 package not installed. abort."
        exit 1
fi
echo "apache2 installed now. good."

#apache2 should be running
#pgrep apache2
#if [ $? -ne 0 ] ; then
#        echo "apache2 service not running. abort."
#        exit 1
#fi

exit 0