mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Deprecate yunohost dyndns installcron/removecron
This commit is contained in:
parent
7efc6dcd07
commit
2752a8e485
3 changed files with 4 additions and 27 deletions
|
@ -1363,13 +1363,11 @@ dyndns:
|
|||
|
||||
### dyndns_installcron()
|
||||
installcron:
|
||||
action_help: Install IP update cron
|
||||
api: POST /dyndns/cron
|
||||
deprecated: true
|
||||
|
||||
### dyndns_removecron()
|
||||
removecron:
|
||||
action_help: Remove IP update cron
|
||||
api: DELETE /dyndns/cron
|
||||
deprecated: true
|
||||
|
||||
|
||||
#############################
|
||||
|
|
|
@ -291,9 +291,6 @@
|
|||
"dpkg_lock_not_available": "This command can't be run right now because another program seems to be using the lock of dpkg (the system package manager)",
|
||||
"dyndns_could_not_check_provide": "Could not check if {provider:s} can provide {domain:s}.",
|
||||
"dyndns_could_not_check_available": "Could not check if {domain:s} is available on {provider:s}.",
|
||||
"dyndns_cron_installed": "DynDNS cron job created",
|
||||
"dyndns_cron_remove_failed": "Could not remove the DynDNS cron job because: {error}",
|
||||
"dyndns_cron_removed": "DynDNS cron job removed",
|
||||
"dyndns_ip_update_failed": "Could not update IP address to DynDNS",
|
||||
"dyndns_ip_updated": "Updated your IP on DynDNS",
|
||||
"dyndns_key_generating": "Generating DNS key... It may take a while.",
|
||||
|
|
|
@ -373,29 +373,11 @@ def dyndns_update(
|
|||
|
||||
|
||||
def dyndns_installcron():
|
||||
"""
|
||||
Install IP update cron
|
||||
|
||||
|
||||
"""
|
||||
with open("/etc/cron.d/yunohost-dyndns", "w+") as f:
|
||||
f.write("*/2 * * * * root yunohost dyndns update >> /dev/null\n")
|
||||
|
||||
logger.success(m18n.n("dyndns_cron_installed"))
|
||||
logger.warning("This command is deprecated. The dyndns cron job should automatically be added/removed by the regenconf depending if there's a private key in /etc/yunohost/dyndns. You can run the regenconf yourself with 'yunohost tools regen-conf yunohost'.")
|
||||
|
||||
|
||||
def dyndns_removecron():
|
||||
"""
|
||||
Remove IP update cron
|
||||
|
||||
|
||||
"""
|
||||
try:
|
||||
os.remove("/etc/cron.d/yunohost-dyndns")
|
||||
except Exception as e:
|
||||
raise YunohostError("dyndns_cron_remove_failed", error=e)
|
||||
|
||||
logger.success(m18n.n("dyndns_cron_removed"))
|
||||
logger.warning("This command is deprecated. The dyndns cron job should automatically be added/removed by the regenconf depending if there's a private key in /etc/yunohost/dyndns. You can run the regenconf yourself with 'yunohost tools regen-conf yunohost'.")
|
||||
|
||||
|
||||
def _guess_current_dyndns_domain(dyn_host):
|
||||
|
|
Loading…
Add table
Reference in a new issue