zoukankan      html  css  js  c++  java
  • (OK) Fedora 24 开机自动启动脚本


    vim /etc/rc.d/rc.local

    #!/bin/bash
    
    systemctl start docker.service
    
    /root/hsl-win7-ns3-root.sh 6 destroy
    /root/hsl-win7-ns3-root.sh 6 destroy
    
    /root/hsl_install_6_docker-centos-quagga.sh destroy
    /root/hsl_install_6_docker-centos-quagga.sh destroy
    
    /root/hsl-win7-ns3-root.sh 6 create
    /root/hsl_install_6_docker-centos-quagga.sh create
    

    chmod +x /etc/rc.d/rc.local

    vim /usr/lib/systemd/system/rc-local.service

    #  This file is part of systemd.
    #
    #  systemd is free software; you can redistribute it and/or modify it
    #  under the terms of the GNU Lesser General Public License as published by
    #  the Free Software Foundation; either version 2.1 of the License, or
    #  (at your option) any later version.
    
    # This unit gets pulled automatically into multi-user.target by
    # systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
    [Unit]
    Description=/etc/rc.d/rc.local Compatibility
    ConditionFileIsExecutable=/etc/rc.d/rc.local
    After=network.target
    
    [Service]
    Type=forking
    ExecStart=/etc/rc.d/rc.local start
    TimeoutSec=0
    RemainAfterExit=yes
    

    systemctl enable rc-local.service
    systemctl status rc-local.service













  • 相关阅读:
    将一个dropdownlist从一个div复制到另一个div
    【转】AOP 那点事儿(续集)
    【转】AOP 那点事儿
    spring 简单配置
    spring 基础原理
    jvm简介
    jre、jdk和jvm的关系
    【转】Jvm工作原理
    servlet简述
    Filter简述
  • 原文地址:https://www.cnblogs.com/ztguang/p/12645787.html
Copyright © 2011-2022 走看看