Go to main content
Oracle® ZFS Storage Appliance 管理ガイド、Release OS8.6.x

印刷ビューの終了

更新: 2016 年 9 月
 
 

init.d サービスの作成

  1. 次の適切なオプションを使用して、init.d サービスを作成します。
    # !/bin/sh
    #
    # zfssa_dbname: Mount ZFSSA project dbname for database dbname
    #
    # chkconfig: 345 61 19
    # description: mounts ZFS Storage Appliance shares
    #
    
    start()
    {
      mount /zfssa/dbname/backup1
      mount /zfssa/dbname/backup2
      mount /zfssa/dbname/backup3
      mount /zfssa/dbname/backup4
      echo "Starting $prog: "
    }
    
    stop()
    {
      umount /zfssa/dbname/backup1
      umount /zfssa/dbname/backup2
      umount /zfssa/dbname/backup3
      umount /zfssa/dbname/backup4
      echo "Stopping $prog: "
    }
    
    case "$1" in
      start)
         start
         ;;
      stop)
         stop
         ;;
      restart)
         stop
         start
         ;;
      status)
         mount
         ;;
       *)
          echo "Usage: $0 {start|stop|restart|status}"
         exit 1
    esac
    
  2. (オプション) 次を入力して、init.d サービスのブート時起動を有効にします。
    # chkconfig zfssa_dbname on
    
  3. (オプション) サービスコマンドを使用してサービスを手動で起動および停止します。
    # service zfssa_dbname start<br/># service zfssa_dbname stop