generated from NethServer/ns8-kickstart
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from NethServer/sdl-7103
Load LDAP domain from config and enhance Nextcloud service management NethServer/dev#7103
- Loading branch information
Showing
4 changed files
with
26 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# | ||
# Copyright (C) 2024 Nethesis S.r.l. | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
import json | ||
import sys | ||
import agent | ||
import os | ||
|
||
event = json.load(sys.stdin) | ||
|
||
config = agent.read_envfile("config.env") | ||
nextcloud_domain = config.get('NEXTCLOUD_DOMAIN', '') | ||
|
||
if event.get('domain') != nextcloud_domain: | ||
exit(0) | ||
|
||
agent.run_helper('systemctl', '--user', '-T', 'try-restart', 'nextcloud.service').check_returncode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters