-
Notifications
You must be signed in to change notification settings - Fork 6
/
spark-cli.service
68 lines (57 loc) · 2.72 KB
/
spark-cli.service
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
#
# This file is part of the eskimo project referenced at www.eskimo.sh. The licensing information below apply just as
# well to this individual file than to the Eskimo Project as a whole.
#
# Copyright 2019 - 2023 eskimo.sh / https://www.eskimo.sh - All rights reserved.
# Author : eskimo.sh / https://www.eskimo.sh
#
# Eskimo is available under a dual licensing model : commercial and GNU AGPL.
# If you did not acquire a commercial licence for Eskimo, you can still use it and consider it free software under the
# terms of the GNU Affero Public License. You can redistribute it and/or modify it under the terms of the GNU Affero
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
# any later version.
# Compliance to each and every aspect of the GNU Affero Public License is mandatory for users who did no acquire a
# commercial license.
#
# Eskimo is distributed as a free software under GNU AGPL 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
# Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License along with Eskimo. If not,
# see <https://www.gnu.org/licenses/> or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA, 02110-1301 USA.
#
# You can be released from the requirements of the license by purchasing a commercial license. Buying such a
# commercial license is mandatory as soon as :
# - you develop activities involving Eskimo without disclosing the source code of your own product, software,
# platform, use cases or scripts.
# - you deploy eskimo as part of a commercial product, platform or software.
# For more information, please contact eskimo.sh at https://www.eskimo.sh
#
# The above copyright notice and this licensing notice shall be included in all copies or substantial portions of the
# Software.
#
[Unit]
Description=Spark client package Availability checker
Wants=network-online.target
After=docker.service
Requires=docker.service
After=gluster.service
After=eskimo-startup-checks.service
StartLimitBurst=4
StartLimitIntervalSec=60
[Service]
TimeoutStartSec=0
RemainAfterExit=false
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
# Basically here we just want SystemD to know if the image is not available anymore.
ExecStart=/bin/bash -c 'while [[ 1 ]]; do if [[ `ls -1 /usr/local/bin | grep -e spark-submit` == "" ]]; then echo "BAD"; exit -1; fi; sleep 5; done'
Type=simple
Restart=always
# Giving a little time to gluster to recover in case of issues
RestartSec=3
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target