Skip to content

Commit

Permalink
project init
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH committed Oct 16, 2024
0 parents commit 24bf5db
Show file tree
Hide file tree
Showing 3,272 changed files with 320,109 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release Raw Module

on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rm -rf .github
- run: mksquashfs raw/ manticore.raw
- name: '更新 Update release'
uses: zhanghengxin/git-release-private@ice
with:
token: ${{ secrets.GITHUB_TOKEN }}
allow_override: true
gzip: false
tag: ${{ steps.get_version.outputs.VERSION }}
files: ./manticore.raw
Binary file added etc/apt/trusted.gpg.d/manticore-keyring.gpg
Binary file not shown.
10 changes: 10 additions & 0 deletions etc/default/manticore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Settings for the manticore searchd daemon
# Please read /usr/share/doc/MANTICORE/README.Debian for details.
#

# Should manticore run automatically on startup? (default: no)
# Before doing this you might want to modify /etc/manticoresearch/manticore.conf
# so that it works for you.
START=no

2 changes: 2 additions & 0 deletions etc/default/manticore-indexer_global
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INDEXER_ARGS=--rotate --quiet
INDEXER_CONFIG=/etc/manticoresearch/manticore.conf
9 changes: 9 additions & 0 deletions etc/logrotate.d/manticore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/manticore/*.log {
weekly
rotate 10
copytruncate
delaycompress
compress
notifempty
missingok
}
9 changes: 9 additions & 0 deletions etc/manticoresearch/manticore.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
searchd {
listen = 127.0.0.1:9312
listen = 127.0.0.1:9306:mysql
listen = 127.0.0.1:9308:http
log = /var/log/manticore/searchd.log
query_log = /var/log/manticore/query.log
pid_file = /var/run/manticore/searchd.pid
data_dir = /var/lib/manticore
}
Binary file added raw/usr/.DS_Store
Binary file not shown.
Binary file added raw/usr/bin/indexer
Binary file not shown.
Binary file added raw/usr/bin/indextool
Binary file not shown.
26 changes: 26 additions & 0 deletions raw/usr/bin/manticore-backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
executor=$(which manticore-executor 2> /dev/null)
if [[ -z "$executor" ]]; then
echo >&2 Manticore Backup requires manticore-executor. Please install package 'manticore-extra'.
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Try to find where is the modules are stored
if [ -d /usr/share/manticore/modules/manticore-backup ]; then
src_dir=/usr/share/manticore/modules/manticore-backup;
elif [ -d /usr/local/share/manticore/modules/manticore-backup ]; then
src_dir=/usr/local/share/manticore/modules/manticore-backup;
elif [ -d /opt/homebrew/share/manticore/modules/manticore-backup ]; then
src_dir=/opt/homebrew/share/manticore/modules/manticore-backup;
elif [ -d "$SCRIPT_DIR/share/modules/manticore-backup" ]; then
src_dir="$SCRIPT_DIR/share/modules/manticore-backup"
elif [ -d "$SCRIPT_DIR/../src/main.php" ]; then
src_dir="$SCRIPT_DIR/.."
elif [ -d "$SCRIPT_DIR/../share/manticore/modules/manticore-backup" ]; then
src_dir="$SCRIPT_DIR/../share/manticore/modules/manticore-backup";
else
echo >&2 Failed to find manticore-backup path in predefined share modules.
exit 1
fi
exec $executor -n "$src_dir/src/main.php" "$@"
Binary file added raw/usr/bin/manticore-executor
Binary file not shown.
17 changes: 17 additions & 0 deletions raw/usr/bin/manticore_new_cluster
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
if [ "$1" = "--force" ]; then
params="--new-cluster-force"
elif [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Usage: $0 [--force]"
echo
echo " W/o params: starts Manticore Search node in a replication cluster, making sure the node was stopped last of all the nodes"
echo " --force: forces starting Manticore Search node as the first node in a cluster"
echo
exit
else
params="--new-cluster"
fi
systemctl set-environment _ADDITIONAL_SEARCHD_PARAMS='$params' && systemctl start manticore
extcode=$?
systemctl set-environment _ADDITIONAL_SEARCHD_PARAMS=''
exit $extcode
33 changes: 33 additions & 0 deletions raw/usr/bin/manticoresearch-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

declare -A distr
distr[4]=buster
distr[8]=jessie
distr[9]=stretch
distr[10]=buster
distr[11]=bullseye
distr[12]=bookworm
distr[14]=trusty
distr[16]=xenial
distr[18]=bionic
distr[19]=bionic
distr[20]=focal
distr[21]=focal
distr[22]=jammy
distr[24]=jammy # should be noble

. /etc/os-release

if [[ -z $VERSION_ID && "$VERSION_CODENAME" == "bookworm" ]]; then
ID=12
elif [[ -n $ID && "$ID" == "linuxmint" ]]; then # Mint Linux support
if [ -n "$DEBIAN_CODENAME" ]; then
distr["linuxmint"]=$DEBIAN_CODENAME
else
distr["linuxmint"]=$UBUNTU_CODENAME
fi
else
ID=$(echo $VERSION_ID | cut -f1 -d.)
fi

echo "deb http://repo.manticoresearch.com/repository/manticoresearch_${distr[$ID]} ${distr[$ID]} main" > /etc/apt/sources.list.d/manticoresearch.list
Binary file added raw/usr/bin/searchd
Binary file not shown.
Binary file added raw/usr/bin/spelldump
Binary file not shown.
Binary file added raw/usr/bin/wordbreaker
Binary file not shown.
Loading

0 comments on commit 24bf5db

Please sign in to comment.