forked from apache/ignite-3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IGNITE-15957: DEB and RPM initial commit (apache#1136)
- Loading branch information
Showing
30 changed files
with
590 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.sh text eol=lf | ||
*.env text eol=lf | ||
*.service text eol=lf | ||
*.conf text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Apache Ignite | ||
Copyright 2021 The Apache Software Foundation | ||
Copyright 2022 The Apache Software Foundation | ||
|
||
This product includes software developed at | ||
The Apache Software Foundation (http://www.apache.org/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/bin/sh | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
source_user_group() { | ||
USERNAME="@USERNAME@" | ||
GROUPNAME="@GROUPNAME@" | ||
|
||
if [ ! "$(getent passwd ${USERNAME})" ]; then | ||
/usr/sbin/useradd "${USERNAME}" | ||
fi | ||
|
||
if [ ! "$(getent group ${GROUPNAME})" ]; then | ||
sudo groupadd "${GROUPNAME}" | ||
sudo usermod -a -G "${GROUPNAME}" "${USERNAME}" | ||
fi | ||
|
||
if [ -f "@CONF_DIR@/@VARS_FILE_NAME@" ]; then . "@CONF_DIR@/@VARS_FILE_NAME@"; fi | ||
} | ||
|
||
pre_uninstall() { | ||
if command -v initctl >/dev/null && initctl version | grep upstart >/dev/null; then | ||
if test -f '@PID_DIR@/@[email protected]'; then | ||
initctl stop '@PRODUCT_NAME@' >/dev/null 2>&1 | ||
fi | ||
elif command -v systemctl >/dev/null && systemctl --version | grep systemd >/dev/null; then | ||
if (systemctl is-active --quiet '@PRODUCT_NAME@'); then | ||
systemctl stop '@PRODUCT_NAME@' >/dev/null 2>&1 | ||
fi | ||
if (systemctl is-enabled --quiet '@PRODUCT_NAME@'); then | ||
systemctl disable '@PRODUCT_NAME@' | ||
fi | ||
else | ||
pid=$(pgrep -f '@PRODUCT_NAME@') | ||
[ -n "$pid" ] && kill "$pid" | ||
sleep 5 | ||
pid=$(pgrep -f '@PRODUCT_NAME@') | ||
[ -n "$pid" ] && kill -9 "$pid" | ||
fi | ||
} | ||
|
||
post_uninstall_remove() { | ||
/bin/rm -rf '@INSTALL_DIR@' >/dev/null 2>&1 | ||
/bin/rm -rf '@LOG_DIR@' >/dev/null 2>&1 | ||
if command -v initctl >/dev/null && initctl version | grep upstart >/dev/null; then | ||
/bin/rm -f '/etc/init/@[email protected]' >/dev/null 2>&1 | ||
/bin/rm -rf '@PID_DIR@' >/dev/null 2>&1 | ||
initctl reload-configuration | ||
echo " @PRODUCT_DISPLAY_NAME@ uninstalled successfully." | ||
elif command -v systemctl >/dev/null && systemctl --version | grep systemd >/dev/null; then | ||
/bin/rm -f '/usr/lib/systemd/system/@[email protected]' >/dev/null 2>&1 | ||
systemctl daemon-reload | ||
echo " @PRODUCT_DISPLAY_NAME@ uninstalled successfully." | ||
fi | ||
} | ||
|
||
post_uninstall_upgrade() { | ||
if command -v initctl >/dev/null && initctl version | grep upstart >/dev/null; then | ||
initctl restart '@PRODUCT_NAME@' | ||
echo " @PRODUCT_DISPLAY_NAME@ upgraded successfully." | ||
elif command -v systemctl >/dev/null && systemctl --version | grep systemd >/dev/null; then | ||
systemctl restart '@PRODUCT_NAME@' | ||
echo " @PRODUCT_DISPLAY_NAME@ upgraded successfully." | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
case "$1" in | ||
remove|purge) | ||
post_uninstall_remove | ||
;; | ||
upgrade) | ||
post_uninstall_upgrade | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
pre_uninstall |
Oops, something went wrong.