Skip to content

Commit 0f7c27d

Browse files
authored
[ZEPPELIN-6182] fix fail on running script to enable system service
### What is this PR for? fixes error on running a script to enable Zeppelin as system service error message: ``` $ sudo ./bin/zeppelin-systemd-service.sh enable Failed to enable unit: Unit file zeppelin.service does not exist. To start Zeppelin using systemd, simply type: # systemctl start zeppelin To check the service health: # systemctl status zeppelin ``` ### What type of PR is it? Bug Fix ### Todos ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-6182 ### How should this be tested? * `sudo ./bin/zeppelin-system-service.sh enable` should work without error message. * `systemctl list-units --all "zeppelin.*" | grep zeppelin` should list zeppelin.service. output: ` zeppelin.service loaded inactive dead Apache Zeppelin daemon` * `sudo ./bin/zeppelin-system-service.sh disable` should work without error message. `systemctl list-units --all "zeppelin.*" | grep zeppelin` should not list zeppelin.service. There should be no /etc/systemd/system/zeppelin.service file. ### Screenshots (if appropriate) ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #4921 from sh1nj1/fix/system-serivce-sh. Signed-off-by: Philipp Dallig <[email protected]>
1 parent 52ea80f commit 0f7c27d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bin/zeppelin-systemd-service.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ function enable_systemd_service()
3737
ZEPPELIN_DIR=$(dirname "${MY_PWD}")
3838

3939
# Copy the unit file.
40-
cp "${ZEPPELIN_DIR}"/scripts/systemd/zeppelin.systemd "${SYSTEMD_DIR}"
40+
cp "${ZEPPELIN_DIR}"/scripts/systemd/zeppelin.service "${SYSTEMD_DIR}"
4141

4242
# Swap the template variable with the right directory path.
4343
sed -i -e "s#%ZEPPELIN_DIR%#${ZEPPELIN_DIR}#g;" \
44-
"${SYSTEMD_DIR}"/zeppelin.systemd
44+
"${SYSTEMD_DIR}"/zeppelin.service
4545

4646
# Set up the unit file.
4747
systemctl daemon-reload
@@ -63,7 +63,7 @@ function disable_systemd_service()
6363
# Let's mop up.
6464
systemctl stop zeppelin.service
6565
systemctl disable zeppelin.service
66-
rm "${SYSMTED_DIR}"/zeppelin.systemd
66+
rm "${SYSTEMD_DIR}"/zeppelin.service
6767
systemctl daemon-reload
6868
systemctl reset-failed
6969

@@ -111,3 +111,4 @@ case "${1}" in
111111
*)
112112
echo "${USAGE}"
113113
esac
114+
File renamed without changes.

0 commit comments

Comments
 (0)