一个简单高效的 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7496619bbe09953a16c0ce18392bfb32c6da60aafeef2fb9012a5e167fa28824
|
|
| MD5 |
dc9e5d59c5e68c8392374e53f6338387
|
|
| BLAKE2b-256 |
9d6146c41e4f9520316470aa3aa2701b4437d1d159f7a0356d4b16dfa5a958f0
|
Provenance
The following attestation bundles were made for autoservice-0.1.3.tar.gz:
Publisher:
python-publish.yml on OpenAISpace/autoservice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autoservice-0.1.3.tar.gz -
Subject digest:
7496619bbe09953a16c0ce18392bfb32c6da60aafeef2fb9012a5e167fa28824 - Sigstore transparency entry: 190614927
- Sigstore integration time:
-
Permalink:
OpenAISpace/autoservice@b8fc04f48ac540baa6721f90896c73e428533953 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/OpenAISpace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b8fc04f48ac540baa6721f90896c73e428533953 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3225114cb22eab755fcd1b4ad5e08bbddf3137ed5c24a87ee4a0dee4be536b3a
|
|
| MD5 |
5862e86416eaf79f951a9b4895dfec8e
|
|
| BLAKE2b-256 |
1c70634b437990aa81bd0567703f8cffa8e8ff8d64c9bdf579c4d6829b763e2a
|
Provenance
The following attestation bundles were made for autoservice-0.1.3-py3-none-any.whl:
Publisher:
python-publish.yml on OpenAISpace/autoservice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autoservice-0.1.3-py3-none-any.whl -
Subject digest:
3225114cb22eab755fcd1b4ad5e08bbddf3137ed5c24a87ee4a0dee4be536b3a - Sigstore transparency entry: 190614930
- Sigstore integration time:
-
Permalink:
OpenAISpace/autoservice@b8fc04f48ac540baa6721f90896c73e428533953 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/OpenAISpace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b8fc04f48ac540baa6721f90896c73e428533953 -
Trigger Event:
release
-
Statement type: