Help us understand the problem. What is going on with this article?

stunnel 用のsystemdスクリプト作成

More than 1 year has passed since last update.

概要

SSLトンネリング用のOSSであるstunnelですが、systemd用のスクリプトがなく、systemctlコマンドで起動や停止ができないのが玉に瑕です。Gitにあった先人の知恵を借りて作成しました。

できること

・stunnelをsystemctlコマンドから制御可能

前提

・OSはCentOS7を使用
・Stunnelの初期設定が完了していること
 【参考】RedHat "4.8. STUNNEL の使用"

作業内容

--スクリプト導入--
# vim /usr/lib/systemd/system/stunnel.service
# ln -s  /usr/lib/systemd/system/stunnel.service  /etc/systemd/system/multi-user.target.wants/stunnel.service 

--動作確認--
# systemctl restart stunnel
# systemctl status stunnel
# ps -eaf|grep stunnel

systemdスクリプト

stunnel.service
[Unit]
Description=SSL tunnel daemons
After=syslog.target
After=network.target

[Install]
WantedBy=multi-user.target

[Service]
Type=forking
ExecStart=/bin/stunnel /etc/stunnel/stunnel.conf
ExecStop=/bin/pkill -e stunnel
Restart=always
PrivateTmp=false

以上。

Uryy
Twitter https://twitter.com/Uryy_502
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした