blob: a31188bebb7cb323207b53a37dd9255b79ad91cf [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
zhang-hared98a5d02013-06-21 18:18:02 +08003# lib/apache
4# Functions to control configuration and operation of apache web server
5
6# Dependencies:
Adam Spiers6a5aa7c2013-10-24 11:27:02 +01007#
8# - ``functions`` file
Dean Troyerd8864fe2014-02-17 11:00:42 -06009# - ``STACK_USER`` must be defined
10#
Stephan Renatuse578eff2013-11-19 13:31:04 +010011# lib/apache exports the following functions:
12#
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010013# - install_apache_wsgi
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +000014# - apache_site_config_for
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010015# - enable_apache_site
16# - disable_apache_site
17# - start_apache_server
18# - stop_apache_server
19# - restart_apache_server
zhang-hared98a5d02013-06-21 18:18:02 +080020
21# Save trace setting
Ian Wienand523f4882015-10-13 11:03:03 +110022_XTRACE_LIB_APACHE=$(set +o | grep xtrace)
zhang-hared98a5d02013-06-21 18:18:02 +080023set +o xtrace
24
25# Allow overriding the default Apache user and group, default to
26# current user and his default group.
Stephan Renatuse578eff2013-11-19 13:31:04 +010027APACHE_USER=${APACHE_USER:-$STACK_USER}
zhang-hared98a5d02013-06-21 18:18:02 +080028APACHE_GROUP=${APACHE_GROUP:-$(id -gn $APACHE_USER)}
29
30
31# Set up apache name and configuration directory
Clark Boylancfb9f052016-11-29 10:43:05 -080032# Note that APACHE_CONF_DIR is really more accurately apache's vhost
33# configuration dir but we can't just change this because public interfaces.
zhang-hared98a5d02013-06-21 18:18:02 +080034if is_ubuntu; then
35 APACHE_NAME=apache2
Dean Troyer444a8d52014-06-06 16:36:52 -050036 APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/sites-available}
Clark Boylancfb9f052016-11-29 10:43:05 -080037 APACHE_SETTINGS_DIR=${APACHE_SETTINGS_DIR:-/etc/$APACHE_NAME/conf-enabled}
zhang-hared98a5d02013-06-21 18:18:02 +080038elif is_fedora; then
39 APACHE_NAME=httpd
Dean Troyer444a8d52014-06-06 16:36:52 -050040 APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/conf.d}
Clark Boylancfb9f052016-11-29 10:43:05 -080041 APACHE_SETTINGS_DIR=${APACHE_SETTINGS_DIR:-/etc/$APACHE_NAME/conf.d}
zhang-hared98a5d02013-06-21 18:18:02 +080042elif is_suse; then
43 APACHE_NAME=apache2
Dean Troyer444a8d52014-06-06 16:36:52 -050044 APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/vhosts.d}
Clark Boylancfb9f052016-11-29 10:43:05 -080045 APACHE_SETTINGS_DIR=${APACHE_SETTINGS_DIR:-/etc/$APACHE_NAME/conf.d}
zhang-hared98a5d02013-06-21 18:18:02 +080046fi
Clark Boylan66ce5c22016-10-05 12:11:05 -070047APACHE_LOG_DIR="/var/log/${APACHE_NAME}"
zhang-hared98a5d02013-06-21 18:18:02 +080048
49# Functions
50# ---------
Gregory Haynes4b49e402016-08-31 18:19:51 -070051
52# Enable apache mod and restart apache if it isn't already enabled.
53function enable_apache_mod {
54 local mod=$1
55 # Apache installation, because we mark it NOPRIME
Clark Boylan35649ae2017-05-27 17:52:55 -070056 if is_ubuntu; then
57 # Skip mod_version as it is not a valid mod to enable
58 # on debuntu, instead it is built in.
59 if [[ "$mod" != "version" ]] && ! a2query -m $mod ; then
60 sudo a2enmod $mod
61 restart_apache_server
62 fi
63 elif is_suse; then
64 if ! a2enmod -q $mod ; then
Gregory Haynes4b49e402016-08-31 18:19:51 -070065 sudo a2enmod $mod
66 restart_apache_server
67 fi
68 elif is_fedora; then
69 # pass
70 true
71 else
72 exit_distro_not_supported "apache enable mod"
73 fi
74}
75
Sean Dague604e5982017-04-13 13:28:12 -040076# NOTE(sdague): Install uwsgi including apache module, we need to get
77# to 2.0.6+ to get a working mod_proxy_uwsgi. We can probably build a
78# check for that and do it differently for different platforms.
79function install_apache_uwsgi {
80 local apxs="apxs2"
81 if is_fedora; then
82 apxs="apxs"
83 fi
84
Ian Wienand2d903562018-05-03 10:51:30 +100085 # This varies based on packaged/installed. If we've
86 # pip_installed, then the pip setup will only build a "python"
87 # module that will be either python2 or python3 depending on what
88 # it was built with.
Sean Dague604e5982017-04-13 13:28:12 -040089 #
Ian Wienand2d903562018-05-03 10:51:30 +100090 # For package installs, the distro ships both plugins and you need
91 # to select the right one ... it will not be autodetected.
92 if python3_enabled; then
93 UWSGI_PYTHON_PLUGIN=python3
94 else
95 UWSGI_PYTHON_PLUGIN=python
96 fi
Sean Dague604e5982017-04-13 13:28:12 -040097
Ian Wienand2d903562018-05-03 10:51:30 +100098 if is_ubuntu; then
99 install_package uwsgi \
100 uwsgi-plugin-python \
101 uwsgi-plugin-python3 \
102 libapache2-mod-proxy-uwsgi
103 elif [[ $os_VENDOR == "Fedora" ]]; then
104 # Note httpd comes with mod_proxy_uwsgi and it is loaded by
105 # default; the mod_proxy_uwsgi package actually conflicts now.
106 # See:
107 # https://bugzilla.redhat.com/show_bug.cgi?id=1574335
108 #
109 # Thus there is nothing else to do after this install
110 install_package uwsgi \
111 uwsgi-plugin-python3
112 else
113 # Centos actually has the module in epel, but there was a big
114 # push to disable epel by default. As such, compile from source
115 # there.
116 local dir
117 dir=$(mktemp -d)
118 pushd $dir
119 pip_install uwsgi
120 pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
121 local uwsgi
122 uwsgi=$(ls uwsgi*)
123 tar xvf $uwsgi
124 cd uwsgi*/apache2
125 sudo $apxs -i -c mod_proxy_uwsgi.c
126 popd
127 # delete the temp directory
128 sudo rm -rf $dir
129 UWSGI_PYTHON_PLUGIN=python
130 fi
Sean Dague604e5982017-04-13 13:28:12 -0400131
Clark Boylan35649ae2017-05-27 17:52:55 -0700132 if is_ubuntu || is_suse ; then
Sean Dague604e5982017-04-13 13:28:12 -0400133 # we've got to enable proxy and proxy_uwsgi for this to work
134 sudo a2enmod proxy
135 sudo a2enmod proxy_uwsgi
136 elif is_fedora; then
137 # redhat is missing a nice way to turn on/off modules
138 echo "LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so" \
139 | sudo tee /etc/httpd/conf.modules.d/02-proxy-uwsgi.conf
140 fi
141 restart_apache_server
142}
143
zhang-hared98a5d02013-06-21 18:18:02 +0800144# install_apache_wsgi() - Install Apache server and wsgi module
Ian Wienandaee18c72014-02-21 15:35:08 +1100145function install_apache_wsgi {
zhang-hared98a5d02013-06-21 18:18:02 +0800146 # Apache installation, because we mark it NOPRIME
147 if is_ubuntu; then
148 # Install apache2, which is NOPRIME'd
Davanum Srinivasafa8a002016-12-19 09:51:01 -0500149 install_package apache2
150 if python3_enabled; then
151 if is_package_installed libapache2-mod-wsgi; then
152 uninstall_package libapache2-mod-wsgi
153 fi
154 install_package libapache2-mod-wsgi-py3
155 else
156 install_package libapache2-mod-wsgi
157 fi
zhang-hared98a5d02013-06-21 18:18:02 +0800158 elif is_fedora; then
159 sudo rm -f /etc/httpd/conf.d/000-*
160 install_package httpd mod_wsgi
Ian Wienand41e6e122017-08-08 15:06:26 +1000161 # For consistency with Ubuntu, switch to the worker mpm, as
Attila Fazekas9fd38e72017-12-11 12:20:25 +0100162 # the default is event
Ian Wienand41e6e122017-08-08 15:06:26 +1000163 sudo sed -i '/mod_mpm_prefork.so/s/^/#/g' /etc/httpd/conf.modules.d/00-mpm.conf
Attila Fazekas9fd38e72017-12-11 12:20:25 +0100164 sudo sed -i '/mod_mpm_event.so/s/^/#/g' /etc/httpd/conf.modules.d/00-mpm.conf
Ian Wienand41e6e122017-08-08 15:06:26 +1000165 sudo sed -i '/mod_mpm_worker.so/s/^#//g' /etc/httpd/conf.modules.d/00-mpm.conf
zhang-hared98a5d02013-06-21 18:18:02 +0800166 elif is_suse; then
167 install_package apache2 apache2-mod_wsgi
168 else
Gregory Haynes4b49e402016-08-31 18:19:51 -0700169 exit_distro_not_supported "apache wsgi installation"
zhang-hared98a5d02013-06-21 18:18:02 +0800170 fi
Gregory Haynes4b49e402016-08-31 18:19:51 -0700171 # WSGI isn't enabled by default, enable it
172 enable_apache_mod wsgi
Morgan Fainbergd074dc72014-06-24 21:33:39 -0700173}
174
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +0000175# apache_site_config_for() - The filename of the site's configuration file.
176# This function uses the global variables APACHE_NAME and APACHE_CONF_DIR.
177#
Sean Dague8f8b2742017-04-13 09:34:12 -0400178# On Ubuntu 14.04+, the site configuration file must have a .conf suffix for a2ensite and a2dissite to
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +0000179# recognise it. a2ensite and a2dissite ignore the .conf suffix used as parameter. The default sites'
180# files are 000-default.conf and default-ssl.conf.
181#
Ralf Haferkamp633a1292014-06-16 14:10:05 +0200182# On Fedora and openSUSE, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +0000183#
184# On RHEL and CentOS, things should hopefully work as in Fedora.
185#
186# The table below summarizes what should happen on each distribution:
187# +----------------------+--------------------+--------------------------+--------------------------+
188# | Distribution | File name | Site enabling command | Site disabling command |
189# +----------------------+--------------------+--------------------------+--------------------------+
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +0000190# | Ubuntu 14.04 | site.conf | a2ensite site | a2dissite site |
191# | Fedora, RHEL, CentOS | site.conf.disabled | mv site.conf{.disabled,} | mv site.conf{,.disabled} |
192# +----------------------+--------------------+--------------------------+--------------------------+
193function apache_site_config_for {
194 local site=$@
195 if is_ubuntu; then
Sean Dague8f8b2742017-04-13 09:34:12 -0400196 # Ubuntu 14.04 - Apache 2.4
197 echo $APACHE_CONF_DIR/${site}.conf
Ralf Haferkamp633a1292014-06-16 14:10:05 +0200198 elif is_fedora || is_suse; then
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +0000199 # fedora conf.d is only imported if it ends with .conf so this is approx the same
Dean Troyer444a8d52014-06-06 16:36:52 -0500200 local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
Gabriel Assis Bezerraa688bc62014-05-27 20:58:22 +0000201 if [ -f $enabled_site_file ]; then
202 echo ${enabled_site_file}
203 else
204 echo ${enabled_site_file}.disabled
205 fi
206 fi
207}
208
Jamie Lennox54707012013-09-17 12:07:48 +1000209# enable_apache_site() - Enable a particular apache site
Ian Wienandaee18c72014-02-21 15:35:08 +1100210function enable_apache_site {
Jamie Lennox54707012013-09-17 12:07:48 +1000211 local site=$@
Clark Boylan35649ae2017-05-27 17:52:55 -0700212 # Many of our sites use mod version. Just enable it.
213 enable_apache_mod version
Jamie Lennox54707012013-09-17 12:07:48 +1000214 if is_ubuntu; then
215 sudo a2ensite ${site}
Ralf Haferkamp633a1292014-06-16 14:10:05 +0200216 elif is_fedora || is_suse; then
Dean Troyer444a8d52014-06-06 16:36:52 -0500217 local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
218 # Do nothing if site already enabled or no site config exists
219 if [[ -f ${enabled_site_file}.disabled ]] && [[ ! -f ${enabled_site_file} ]]; then
220 sudo mv ${enabled_site_file}.disabled ${enabled_site_file}
221 fi
Jamie Lennox54707012013-09-17 12:07:48 +1000222 fi
223}
224
225# disable_apache_site() - Disable a particular apache site
Ian Wienandaee18c72014-02-21 15:35:08 +1100226function disable_apache_site {
Jamie Lennox54707012013-09-17 12:07:48 +1000227 local site=$@
228 if is_ubuntu; then
Chris Dent2fcdaac2017-04-18 16:54:12 +0100229 sudo a2dissite ${site} || true
Ralf Haferkamp633a1292014-06-16 14:10:05 +0200230 elif is_fedora || is_suse; then
Dean Troyer444a8d52014-06-06 16:36:52 -0500231 local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
232 # Do nothing if no site config exists
233 if [[ -f ${enabled_site_file} ]]; then
234 sudo mv ${enabled_site_file} ${enabled_site_file}.disabled
235 fi
Jamie Lennox54707012013-09-17 12:07:48 +1000236 fi
237}
238
zhang-hared98a5d02013-06-21 18:18:02 +0800239# start_apache_server() - Start running apache server
Ian Wienandaee18c72014-02-21 15:35:08 +1100240function start_apache_server {
zhang-hared98a5d02013-06-21 18:18:02 +0800241 start_service $APACHE_NAME
242}
243
244# stop_apache_server() - Stop running apache server
Ian Wienandaee18c72014-02-21 15:35:08 +1100245function stop_apache_server {
zhang-hared98a5d02013-06-21 18:18:02 +0800246 if [ -n "$APACHE_NAME" ]; then
247 stop_service $APACHE_NAME
248 else
249 exit_distro_not_supported "apache configuration"
250 fi
251}
252
253# restart_apache_server
Ian Wienandaee18c72014-02-21 15:35:08 +1100254function restart_apache_server {
Morgan Fainberg2df00462014-07-15 11:06:36 -0700255 # Apache can be slow to stop, doing an explicit stop, sleep, start helps
256 # to mitigate issues where apache will claim a port it's listening on is
257 # still in use and fail to start.
Sean Dague2b85cf02017-04-13 09:02:14 -0400258 restart_service $APACHE_NAME
zhang-hared98a5d02013-06-21 18:18:02 +0800259}
260
Sean Dague2f8c88e2017-04-13 09:08:39 -0400261function write_uwsgi_config {
262 local file=$1
263 local wsgi=$2
264 local url=$3
265 local http=$4
266 local name=""
267 name=$(basename $wsgi)
rabiaa26baa2017-04-20 10:55:16 +0530268
269 # create a home for the sockets; note don't use /tmp -- apache has
270 # a private view of it on some platforms.
271 local socket_dir='/var/run/uwsgi'
Kirill Zaitsevd0db62a2017-05-26 19:02:52 +0300272
273 # /var/run will be empty on ubuntu after reboot, so we can use systemd-temptiles
274 # to automatically create $socket_dir.
275 sudo mkdir -p /etc/tmpfiles.d/
276 echo "d $socket_dir 0755 $STACK_USER root" | sudo tee /etc/tmpfiles.d/uwsgi.conf
277 sudo systemd-tmpfiles --create /etc/tmpfiles.d/uwsgi.conf
278
rabiaa26baa2017-04-20 10:55:16 +0530279 local socket="$socket_dir/${name}.socket"
Sean Dague2f8c88e2017-04-13 09:08:39 -0400280
281 # always cleanup given that we are using iniset here
282 rm -rf $file
283 iniset "$file" uwsgi wsgi-file "$wsgi"
Sean Dague2f8c88e2017-04-13 09:08:39 -0400284 iniset "$file" uwsgi processes $API_WORKERS
285 # This is running standalone
286 iniset "$file" uwsgi master true
287 # Set die-on-term & exit-on-reload so that uwsgi shuts down
288 iniset "$file" uwsgi die-on-term true
Dinesh Bhoref60f2b2017-09-05 14:40:32 +0530289 iniset "$file" uwsgi exit-on-reload false
Matthew Treinish477a9622017-08-04 11:09:26 -0400290 # Set worker-reload-mercy so that worker will not exit till the time
291 # configured after graceful shutdown
292 iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
Sean Dague2f8c88e2017-04-13 09:08:39 -0400293 iniset "$file" uwsgi enable-threads true
Ian Wienand2d903562018-05-03 10:51:30 +1000294 iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
Sean Dague2f8c88e2017-04-13 09:08:39 -0400295 # uwsgi recommends this to prevent thundering herd on accept.
296 iniset "$file" uwsgi thunder-lock true
Matthew Treinish477a9622017-08-04 11:09:26 -0400297 # Set hook to trigger graceful shutdown on SIGTERM
298 iniset "$file" uwsgi hook-master-start "unix_signal:15 gracefully_kill_them_all"
Sean Dague2f8c88e2017-04-13 09:08:39 -0400299 # Override the default size for headers from the 4k default.
300 iniset "$file" uwsgi buffer-size 65535
301 # Make sure the client doesn't try to re-use the connection.
302 iniset "$file" uwsgi add-header "Connection: close"
303 # This ensures that file descriptors aren't shared between processes.
304 iniset "$file" uwsgi lazy-apps true
Sean Dague2f8c88e2017-04-13 09:08:39 -0400305
306 # If we said bind directly to http, then do that and don't start the apache proxy
307 if [[ -n "$http" ]]; then
308 iniset "$file" uwsgi http $http
309 else
310 local apache_conf=""
311 apache_conf=$(apache_site_config_for $name)
Chris Dentb90bb1a2017-04-18 16:30:14 +0000312 iniset "$file" uwsgi socket "$socket"
313 iniset "$file" uwsgi chmod-socket 666
Matthew Treinish1fa65362017-06-23 22:32:37 +0000314 echo "ProxyPass \"${url}\" \"unix:${socket}|uwsgi://uwsgi-uds-${name}/\" retry=0 " | sudo tee -a $apache_conf
Sean Dague2f8c88e2017-04-13 09:08:39 -0400315 enable_apache_site $name
Ian Wienandf6a2d2c2017-04-26 10:50:29 +1000316 restart_apache_server
Sean Dague2f8c88e2017-04-13 09:08:39 -0400317 fi
318}
319
Matthew Treinish1fa65362017-06-23 22:32:37 +0000320# For services using chunked encoding, the only services known to use this
321# currently are Glance and Swift, we need to use an http proxy instead of
322# mod_proxy_uwsgi because the chunked encoding gets dropped. See:
323# https://github.com/unbit/uwsgi/issues/1540 You can workaround this on python2
324# but that involves having apache buffer the request before sending it to
Jeremy Liu2f7df512017-07-12 10:09:48 +0800325# uwsgi.
Matthew Treinish1fa65362017-06-23 22:32:37 +0000326function write_local_uwsgi_http_config {
327 local file=$1
328 local wsgi=$2
329 local url=$3
330 name=$(basename $wsgi)
331
332 # create a home for the sockets; note don't use /tmp -- apache has
333 # a private view of it on some platforms.
334
335 # always cleanup given that we are using iniset here
336 rm -rf $file
337 iniset "$file" uwsgi wsgi-file "$wsgi"
338 port=$(get_random_port)
Matthew Treinish1560efe2017-06-30 12:15:26 -0400339 iniset "$file" uwsgi http-socket "127.0.0.1:$port"
Matthew Treinish1fa65362017-06-23 22:32:37 +0000340 iniset "$file" uwsgi processes $API_WORKERS
341 # This is running standalone
342 iniset "$file" uwsgi master true
343 # Set die-on-term & exit-on-reload so that uwsgi shuts down
344 iniset "$file" uwsgi die-on-term true
Dinesh Bhoref60f2b2017-09-05 14:40:32 +0530345 iniset "$file" uwsgi exit-on-reload false
Matthew Treinish1fa65362017-06-23 22:32:37 +0000346 iniset "$file" uwsgi enable-threads true
Ian Wienand2d903562018-05-03 10:51:30 +1000347 iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
Matthew Treinish1fa65362017-06-23 22:32:37 +0000348 # uwsgi recommends this to prevent thundering herd on accept.
349 iniset "$file" uwsgi thunder-lock true
Matthew Treinish477a9622017-08-04 11:09:26 -0400350 # Set hook to trigger graceful shutdown on SIGTERM
351 iniset "$file" uwsgi hook-master-start "unix_signal:15 gracefully_kill_them_all"
352 # Set worker-reload-mercy so that worker will not exit till the time
353 # configured after graceful shutdown
354 iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
Matthew Treinish1fa65362017-06-23 22:32:37 +0000355 # Override the default size for headers from the 4k default.
356 iniset "$file" uwsgi buffer-size 65535
357 # Make sure the client doesn't try to re-use the connection.
358 iniset "$file" uwsgi add-header "Connection: close"
359 # This ensures that file descriptors aren't shared between processes.
360 iniset "$file" uwsgi lazy-apps true
361 iniset "$file" uwsgi chmod-socket 666
362 iniset "$file" uwsgi http-raw-body true
363 iniset "$file" uwsgi http-chunked-input true
364 iniset "$file" uwsgi http-auto-chunked true
Matthew Treinish82d06102017-06-28 17:42:31 -0400365 iniset "$file" uwsgi http-keepalive false
Matthew Treinishb79531a2017-06-30 12:10:06 -0400366 # Increase socket timeout for slow chunked uploads
367 iniset "$file" uwsgi socket-timeout 30
Matthew Treinish1fa65362017-06-23 22:32:37 +0000368
369 enable_apache_mod proxy
370 enable_apache_mod proxy_http
371 local apache_conf=""
372 apache_conf=$(apache_site_config_for $name)
373 echo "KeepAlive Off" | sudo tee $apache_conf
Matthew Treinisha3488d52017-08-10 14:55:15 -0400374 echo "SetEnv proxy-sendchunked 1" | sudo tee -a $apache_conf
Matthew Treinish1fa65362017-06-23 22:32:37 +0000375 echo "ProxyPass \"${url}\" \"http://127.0.0.1:$port\" retry=0 " | sudo tee -a $apache_conf
376 enable_apache_site $name
377 restart_apache_server
378}
379
Sean Dague2f8c88e2017-04-13 09:08:39 -0400380function remove_uwsgi_config {
381 local file=$1
382 local wsgi=$2
383 local name=""
384 name=$(basename $wsgi)
385
386 rm -rf $file
387 disable_apache_site $name
388}
389
zhang-hared98a5d02013-06-21 18:18:02 +0800390# Restore xtrace
Ian Wienand523f4882015-10-13 11:03:03 +1100391$_XTRACE_LIB_APACHE
zhang-hared98a5d02013-06-21 18:18:02 +0800392
Adam Spiers6a5aa7c2013-10-24 11:27:02 +0100393# Tell emacs to use shell-script-mode
394## Local variables:
395## mode: shell-script
396## End: