초기 버전 v1.0.0 구현
개인 NAS용 생존 확인 웹앱의 기본 기능, Docker 배포 설정, 설치 문서를 추가합니다.
This commit is contained in:
20
scripts/cleanup.sh
Executable file
20
scripts/cleanup.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
TARGET="${COLLECTION_PATH:-/home/zenn/Collection}"
|
||||
|
||||
case "$TARGET" in
|
||||
/home/zenn/Collection) ;;
|
||||
*)
|
||||
echo "[collection-keeper] refused unsafe path: $TARGET"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -e "$TARGET" ]; then
|
||||
echo "[collection-keeper] target not found: $TARGET"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rm -rf -- "$TARGET"
|
||||
echo "[collection-keeper] deleted: $TARGET"
|
||||
Reference in New Issue
Block a user