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()
|
### dyndns_installcron()
|
||||||
installcron:
|
installcron:
|
||||||
action_help: Install IP update cron
|
deprecated: true
|
||||||
api: POST /dyndns/cron
|
|
||||||
|
|
||||||
### dyndns_removecron()
|
### dyndns_removecron()
|
||||||
removecron:
|
removecron:
|
||||||
action_help: Remove IP update cron
|
deprecated: true
|
||||||
api: DELETE /dyndns/cron
|
|
||||||
|
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
|
|
|
@ -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)",
|
"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_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_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_update_failed": "Could not update IP address to DynDNS",
|
||||||
"dyndns_ip_updated": "Updated your IP on DynDNS",
|
"dyndns_ip_updated": "Updated your IP on DynDNS",
|
||||||
"dyndns_key_generating": "Generating DNS key... It may take a while.",
|
"dyndns_key_generating": "Generating DNS key... It may take a while.",
|
||||||
|
|
|
@ -373,29 +373,11 @@ def dyndns_update(
|
||||||
|
|
||||||
|
|
||||||
def dyndns_installcron():
|
def dyndns_installcron():
|
||||||
"""
|
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'.")
|
||||||
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"))
|
|
||||||
|
|
||||||
|
|
||||||
def dyndns_removecron():
|
def dyndns_removecron():
|
||||||
"""
|
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'.")
|
||||||
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"))
|
|
||||||
|
|
||||||
|
|
||||||
def _guess_current_dyndns_domain(dyn_host):
|
def _guess_current_dyndns_domain(dyn_host):
|
||||||
|
|
Loading…
Add table
Reference in a new issue