Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- 他リポジトリとのバージョン整合のためバージョンを更新しました
- このバージョンではコードの変更はありません

## v0.0.11
- クリーンアップスクリプトのリネーム

## v0.0.10
- 他リポジトリとのバージョン整合のためバージョンを更新しました
- このバージョンではコードの変更はありません
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

set -e

readonly CASA_SERVICES=(
readonly CASSETTE_SERVICES=(
"cassetteos-message-bus.service"
)

readonly CASA_EXEC=cassetteos-message-bus
readonly CASA_CONF=/etc/cassetteos/message-bus.conf
readonly CASA_DB=/var/lib/cassetteos/db/message-bus.db
readonly CASSETTE_EXEC=cassetteos-message-bus
readonly CASSETTE_CONF=/etc/cassetteos/message-bus.conf
readonly CASSETTE_DB=/var/lib/cassetteos/db/message-bus.db

readonly aCOLOUR=(
'\e[38;5;154m' # green | Lines, bullets and separators
Expand Down Expand Up @@ -44,8 +44,8 @@ onCtrlC() {
exit 1
}

if [[ ! -x "$(command -v ${CASA_EXEC})" ]]; then
Show 2 "${CASA_EXEC} is not detected, exit the script."
if [[ ! -x "$(command -v ${CASSETTE_EXEC})" ]]; then
Show 2 "${CASSETTE_EXEC} is not detected, exit the script."
exit 1
fi

Expand All @@ -67,14 +67,14 @@ while true; do
esac
done

for SERVICE in "${CASA_SERVICES[@]}"; do
for SERVICE in "${CASSETTE_SERVICES[@]}"; do
Show 2 "Stopping ${SERVICE}..."
systemctl disable --now "${SERVICE}" || Show 3 "Failed to disable ${SERVICE}"
done

rm -rvf "$(which ${CASA_EXEC})" || Show 3 "Failed to remove ${CASA_EXEC}"
rm -rvf "${CASA_CONF}" || Show 3 "Failed to remove ${CASA_CONF}"
rm -rvf "$(which ${CASSETTE_EXEC})" || Show 3 "Failed to remove ${CASSETTE_EXEC}"
rm -rvf "${CASSETTE_CONF}" || Show 3 "Failed to remove ${CASSETTE_CONF}"

if [[ ${REMOVE_LOCAL_STORAGE_DATABASE} == true ]]; then
rm -rvf "${CASA_DB}" || Show 3 "Failed to remove ${CASA_DB}"
rm -rvf "${CASSETTE_DB}" || Show 3 "Failed to remove ${CASSETTE_DB}"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

set -e

readonly CASA_SERVICES=(
readonly CASSETTE_SERVICES=(
"cassetteos-message-bus.service"
)

readonly CASA_EXEC=cassetos-message-bus
readonly CASA_CONF=/etc/cassetteos/message-bus.conf
readonly CASA_DB=/var/lib/cassetteos/db/message-bus.db
readonly CASSETTE_EXEC=cassetteos-message-bus
readonly CASSETTE_CONF=/etc/cassetteos/message-bus.conf
readonly CASSETTE_DB=/var/lib/cassetteos/db/message-bus.db

readonly aCOLOUR=(
'\e[38;5;154m' # green | Lines, bullets and separators
Expand Down Expand Up @@ -44,8 +44,8 @@ onCtrlC() {
exit 1
}

if [[ ! -x "$(command -v ${CASA_EXEC})" ]]; then
Show 2 "${CASA_EXEC} is not detected, exit the script."
if [[ ! -x "$(command -v ${CASSETTE_EXEC})" ]]; then
Show 2 "${CASSETTE_EXEC} is not detected, exit the script."
exit 1
fi

Expand All @@ -67,14 +67,14 @@ while true; do
esac
done

for SERVICE in "${CASA_SERVICES[@]}"; do
for SERVICE in "${CASSETTE_SERVICES[@]}"; do
Show 2 "Stopping ${SERVICE}..."
systemctl disable --now "${SERVICE}" || Show 3 "Failed to disable ${SERVICE}"
done

rm -rvf "$(which ${CASA_EXEC})" || Show 3 "Failed to remove ${CASA_EXEC}"
rm -rvf "${CASA_CONF}" || Show 3 "Failed to remove ${CASA_CONF}"
rm -rvf "$(which ${CASSETTE_EXEC})" || Show 3 "Failed to remove ${CASSETTE_EXEC}"
rm -rvf "${CASSETTE_CONF}" || Show 3 "Failed to remove ${CASSETTE_CONF}"

if [[ ${REMOVE_LOCAL_STORAGE_DATABASE} == true ]]; then
rm -rvf "${CASA_DB}" || Show 3 "Failed to remove ${CASA_DB}"
rm -rvf "${CASSETTE_DB}" || Show 3 "Failed to remove ${CASSETTE_DB}"
fi
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.21.7

require (
github.com/BeesNestInc/CassetteOS-Common v0.0.10
github.com/BeesNestInc/CassetteOS-Common v0.0.11
github.com/CorrectRoadH/go-socket.io v1.8.0-rc.5
github.com/glebarez/sqlite v1.7.0
github.com/gobwas/ws v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/BeesNestInc/CassetteOS-Common v0.0.10 h1:UoZUZszHqlTtkYHO5R00MyscqzRfVNMi9voIsVWrRWM=
github.com/BeesNestInc/CassetteOS-Common v0.0.10/go.mod h1:widQKlAywDFAdxMiSJr5t1bXU7GE9PI2cVPP1JPGCxo=
github.com/BeesNestInc/CassetteOS-Common v0.0.11 h1:YmKmJnoyS6BDfFMshd86IJI44iN1gFViP/2EJq+S3Zo=
github.com/BeesNestInc/CassetteOS-Common v0.0.11/go.mod h1:DGaVmEbHt/Nv5ik1c0kYq/30+Ib+EWv6KqYzSnP5ABQ=
github.com/CorrectRoadH/go-socket.io v1.8.0-rc.5 h1:cjlXtmuOug5168+XRM+7iJxbd9lLkL9AgzemF7ZqoPI=
github.com/CorrectRoadH/go-socket.io v1.8.0-rc.5/go.mod h1:DgupkgFQg7/js8Tr1uLYICJRGlHmKWIV6hWWTH2V2fc=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
Expand Down