Create new apache2.sevice unit for systemd based on generated wrapper to add Partof...
authorAndy Witter <awitter@georgialibraries.org>
Mon, 7 Jan 2019 17:44:17 +0000 (12:44 -0500)
committerAndy Witter <awitter@georgialibraries.org>
Mon, 7 Jan 2019 17:44:17 +0000 (12:44 -0500)
GenaSYS.sh
templates/debs/opensrf_3.0.2_amd64.deb
templates/systemd/apache2.service [new file with mode: 0644]
templates/systemd/opensrf.service

index 36d7d2d..35a268c 100755 (executable)
@@ -25,8 +25,8 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.93"
-       DATE_="2010-11-23; last update: 2019-01-05"
+    VERSION_="1.94"
+       DATE_="2010-11-23; last update: 2019-01-07"
      AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
         URL_="http://evergreen-ils.org"
    CATEGORY_="devel"
@@ -1979,6 +1979,7 @@ for BRICK in $(seq $BRICKCOUNT)
         eval cp -f $TMPFOLDER/60-evergreen-ils.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
        eval cp -f $TEMPLATEDIR/rsyslog/50-default.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
        eval cp -f $TEMPLATEDIR/systemd/autogen.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+       eval cp -f $TEMPLATEDIR/systemd/apache2.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
        eval cp -f $TEMPLATEDIR/systemd/opensrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/opensrf
        eval cp -f $TEMPLATEDIR/monitor/check_osrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/nagios
        #eval sed -i "s^CLUSTER_DOMAINNAME^${CLUSTERDOMAINNAME}^g" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/60-evergreen-ils.conf
@@ -2154,6 +2155,7 @@ for BRICK in $(seq $BRICKCOUNT)
        eval cp -f $TMPFOLDER/60-evergreen-ils.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
        eval cp -f $TEMPLATEDIR/rsyslog/50-default.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
        eval cp -f $TEMPLATEDIR/systemd/autogen.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+       eval cp -f $TEMPLATEDIR/systemd/apache2.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
        eval cp -f $TEMPLATEDIR/systemd/opensrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/opensrf
        eval cp -f $TEMPLATEDIR/monitor/check_osrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/nagios
        #eval cp -f /tmp/rsyslog.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/
@@ -2571,6 +2573,7 @@ done
 for UTILITY in $MACHINES_UTILITY; do
 mkdir -p "$OUTDIR/$UTILITY/etc/systemd/system"
 cp -f "$TEMPLATEDIR/systemd/autogen.service" "$OUTDIR/$UTILITY/etc/systemd/system"
+cp -f "$TEMPLATEDIR/systemd/apache2.service" "$OUTDIR/$UTILITY/etc/systemd/system"
 cp -f "$TMPFOLDER/exports" "$OUTDIR/$UTILITY/etc/"
 
 ### action trigger filters for utility.
index 4f02cac..71213b9 100644 (file)
Binary files a/templates/debs/opensrf_3.0.2_amd64.deb and b/templates/debs/opensrf_3.0.2_amd64.deb differ
diff --git a/templates/systemd/apache2.service b/templates/systemd/apache2.service
new file mode 100644 (file)
index 0000000..9388b26
--- /dev/null
@@ -0,0 +1,33 @@
+#generated by systemd-sysv-generator, modified by pines-admins                                                                                                                                                 |
+#Added PartOf=opensrf.service in the [Unit] section                                                                                                                                                            |
+#Added WantedBy=multi-user.target in the [Install] section                                                                                                                                                     |
+                                                                                                                                                                                                               |
+[Unit]                                                                                                                                                                                                         |
+Documentation=man:systemd-sysv-generator(8)                                                                                                                                                                    |
+SourcePath=/etc/init.d/apache2                                                                                                                                                                                 |
+Description=LSB: Apache2 web server                                                                                                                                                                            |
+Before=multi-user.target                                                                                                                                                                                       |
+Before=graphical.target                                                                                                                                                                                        |
+Before=shutdown.target                                                                                                                                                                                         |
+After=local-fs.target                                                                                                                                                                                          |
+After=remote-fs.target                                                                                                                                                                                         |
+After=network-online.target                                                                                                                                                                                    |
+After=systemd-journald-dev-log.socket                                                                                                                                                                          |
+After=nss-lookup.target                                                                                                                                                                                        |
+Wants=network-online.target                                                                                                                                                                                    |
+Conflicts=shutdown.target                                                                                                                                                                                      |
+PartOf=opensrf.service                                                                                                                                                                                         |
+[Service]                                                                                                                                                                                                      |
+Type=forking                                                                                                                                                                                                   |
+Restart=no                                                                                                                                                                                                     |
+TimeoutSec=5min                                                                                                                                                                                                |
+IgnoreSIGPIPE=no                                                                                                                                                                                               |
+KillMode=process                                                                                                                                                                                               |
+GuessMainPID=no                                                                                                                                                                                                |
+RemainAfterExit=yes                                                                                                                                                                                            |
+ExecStart=/etc/init.d/apache2 start                                                                                                                                                                            |
+ExecStop=/etc/init.d/apache2 stop                                                                                                                                                                              |
+ExecReload=/etc/init.d/apache2 reload                                                                                                                                                                          |
+                                                                                                                                                                                                               |
+[Install]                                                                                                                                                                                                      |
+WantedBy=multi-user.target
index 025f853..7acbf5c 100644 (file)
@@ -11,7 +11,7 @@ Group=opensrf
 Type=oneshot
 RemainAfterExit=yes
 Environment=PATH=/openils/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-#ExecStartPre=/bin/sleep 5
+ExecStartPre=/bin/sleep 5
 ExecStart=/openils/bin/osrf_control --start-all
 #ExecStartPost=/bin/sleep 5
 ExecStartPost=/usr/bin/sudo /bin/systemctl -q restart apache2.service