Maktub_Wiki Maktub_Wiki
主站 (opens new window)
  • 服务搭建
  • 网络服务
  • 开源框架
  • 操作系统
  • iOS/MacOS
  • 算法导论(Python)
  • Leetcode
  • 线性代数
  • 经济周期笔记
  • 交易技术笔记
主站 (opens new window)
  • 服务搭建
  • 网络服务
  • 开源框架
  • 操作系统
  • iOS/MacOS
  • 算法导论(Python)
  • Leetcode
  • 线性代数
  • 经济周期笔记
  • 交易技术笔记
  • Openwrt路由系统

    • 1.推荐软件
    • 2.磁盘扩容
    • 3.服务自启动
      • 4.脚本
      • 5.旁路由模式设置
      • 疑难问题

        • 1.MT7621适配问题
        • 2.Docker的cgroup问题
    • Linux系统

      • 常规配置
      • 树莓派
      • 极简系统问题
      • dd Debian系统
      • samba服务配置
    • MacOS系统

      • 设置问题
    • Windows系统

      • 命令行操作
    • 树莓派
    • 操作系统
    • Openwrt路由系统
    Maktub_小明
    2024-03-26
    目录

    3.服务自启动

    # 3.1 创建服务

    1. 编辑/etc/init.d/client
    #!/bin/sh /etc/rc.common
    
    START=99
    USE_PROCD=1
    
    start_service() {
        procd_open_instance
        procd_set_param command /root/.tool/client-linux.py
        procd_set_param respawn
        procd_close_instance
    }
    
    stop_service() {
        procd_close_instance
    }
    
    1. 启动服务
    /etc/init.d/client start
    /etc/init.d/client enable
    /etc/init.d/client status
    
    上次更新: 2026/03/15, 14:32:12
    2.磁盘扩容
    4.脚本

    ← 2.磁盘扩容 4.脚本→

    Theme by Vdoing | Copyright © 2021-2026 Maktub_小明 | MIT License
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式