diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/setup_git/templates/gitweb.service | 28 | ||||
-rw-r--r-- | roles/setup_mkdocs/templates/mkdocs.service | 27 | ||||
-rw-r--r-- | roles/setup_syncthing/templates/syncthing.service | 3 |
3 files changed, 58 insertions, 0 deletions
diff --git a/roles/setup_git/templates/gitweb.service b/roles/setup_git/templates/gitweb.service new file mode 100644 index 0000000..0b65b49 --- /dev/null +++ b/roles/setup_git/templates/gitweb.service @@ -0,0 +1,28 @@ + +# =========================================================================== # +# _ __ _ __ +# __ ______ (_) /_ ____ _(_) /_ +# / / / / __ \/ / __/ / __ `/ / __/ +# / /_/ / / / / / /__ / /_/ / / /_ +# \__,_/_/ /_/_/\__(_) \__, /_/\__/ +# /____/ +# +# =========================================================================== # + +[Unit] +Description=Gitweb interface for git repositories + +[Service] +Type=forking +User={{ git_user }} +Group={{ git_group }} +WorkingDirectory={{ git_directory_path }}/{{ git_gitweb_default_repository }} +ExecStart=/usr/bin/git instaweb --port={{ g_port_gitweb_gui }} +ExecStop=/bin/kill -s HUP $MAINPID +RuntimeDirectoryMode=0700 + +Restart=on-failure +RestartSec=60s + +[Install] +WantedBy=default.target diff --git a/roles/setup_mkdocs/templates/mkdocs.service b/roles/setup_mkdocs/templates/mkdocs.service new file mode 100644 index 0000000..eecd126 --- /dev/null +++ b/roles/setup_mkdocs/templates/mkdocs.service @@ -0,0 +1,27 @@ + +# =========================================================================== # +# _ __ __ __ _ +# __ ______ (_) /_ _______ ______ _____/ /_/ /_ (_)___ ____ _ +# / / / / __ \/ / __/ / ___/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ +# / /_/ / / / / / /__ (__ ) /_/ / / / / /__/ /_/ / / / / / / / /_/ / +# \__,_/_/ /_/_/\__(_) /____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / +# /____/ /____/ +# +# =========================================================================== # + +[Unit] +Description=Webserver for markdown documentation + +[Service] +Type=simple +User={{ mkdocs_user }} +WorkingDirectory={{ mkdocs_files_directory }} +ExecStart=mkdocs serve --dev-addr {{g_ip_mkdocs_gui}}:{{g_port_mkdocs_gui }} +ExecStop=/bin/kill -s HUP $MAINPID +RuntimeDirectoryMode=0700 + +Restart=on-failure +RestartSec=60s + +[Install] +WantedBy=default.target diff --git a/roles/setup_syncthing/templates/syncthing.service b/roles/setup_syncthing/templates/syncthing.service index fe4c429..e6d5485 100644 --- a/roles/setup_syncthing/templates/syncthing.service +++ b/roles/setup_syncthing/templates/syncthing.service @@ -21,5 +21,8 @@ ExecStart={{ syncthing_bin_directory }}/syncthing ExecStop=/bin/kill -s HUP $MAINPID RuntimeDirectoryMode=0700 +Restart=on-failure +RestartSec=60s + [Install] WantedBy=default.target |