Skip to main content

一个简单高效的 systemd 服务管理工具,支持自动创建配置文件并智能适配不同类型的服务。

Project description

AutoService

一个简单高效的 systemd 服务管理工具。

痛点

  • systemd 服务创建流程繁琐,需要手动编写配置文件
  • 不同类型程序(Python、Shell等)的服务配置方式不同
  • 服务管理命令分散,使用不便

解决方案

  • 自动生成标准化的服务配置文件
  • 智能识别命令类型,自动适配不同运行环境
  • 统一的命令行接口管理全部服务

使用效果

# 创建服务(自动处理配置文件)
sudo autoservice create my-app "python app.py"

# 支持 Python 虚拟环境
sudo autoservice create venv-app "poetry run python app.py"

# 查看服务状态
sudo autoservice list
my-app: 🟢 运行中
venv-app:  已停止

# 实时查看日志
sudo autoservice logs my-app -f

# 服务管理
sudo autoservice start my-app
sudo autoservice stop my-app
sudo autoservice restart my-app
sudo autoservice remove my-app

安装

sudo pip install autoservice

功能特点

  • 支持创建、启动、停止、重启和删除 systemd 服务
  • 自动适配不同类型的命令(Python、Shell 等)
  • 自动检测 Python 虚拟环境
  • 简单易用的命令行界面

使用方法

创建服务

sudo autoservice create <服务名> <命令>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoservice-0.1.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoservice-0.1.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file autoservice-0.1.3.tar.gz.

File metadata

  • Download URL: autoservice-0.1.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for autoservice-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7496619bbe09953a16c0ce18392bfb32c6da60aafeef2fb9012a5e167fa28824
MD5 dc9e5d59c5e68c8392374e53f6338387
BLAKE2b-256 9d6146c41e4f9520316470aa3aa2701b4437d1d159f7a0356d4b16dfa5a958f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoservice-0.1.3.tar.gz:

Publisher: python-publish.yml on OpenAISpace/autoservice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoservice-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: autoservice-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for autoservice-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3225114cb22eab755fcd1b4ad5e08bbddf3137ed5c24a87ee4a0dee4be536b3a
MD5 5862e86416eaf79f951a9b4895dfec8e
BLAKE2b-256 1c70634b437990aa81bd0567703f8cffa8e8ff8d64c9bdf579c4d6829b763e2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoservice-0.1.3-py3-none-any.whl:

Publisher: python-publish.yml on OpenAISpace/autoservice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page