Skip to content
This repository was archived by the owner on Apr 5, 2021. It is now read-only.

Commit c4e5b60

Browse files
committed
fix for cron
1 parent bdfa8e9 commit c4e5b60

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

Rexfile.d/finish.task

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,28 @@ task "finish", group => "rootserver", sub {
55
my $user = $sys_conf->{user};
66
my $dh_length = $sys_conf->{dh_length};
77

8-
Rex::Logger::info("create the cron entry for letsencrypt");
9-
# create cron entry for letsencrypt renewal daily
10-
cron_entry "letsencrypt-renewal",
11-
ensure => "present",
12-
command => "certbot renewal",
13-
minute => "1",
14-
hour => "23",
15-
user => "$user";
8+
my $os = lc(get_operating_system());
9+
10+
if( $os eq "ubuntu" ) {
11+
Rex::Logger::info("create the cron entry for letsencrypt");
12+
# create cron entry for letsencrypt renewal daily
13+
cron_entry "letsencrypt-renewal",
14+
ensure => "present",
15+
command => "certbot renewal",
16+
minute => "1",
17+
hour => "23",
18+
user => "$user";
19+
}
20+
else {
21+
Rex::Logger::info("create the cron entry for letsencrypt");
22+
# create cron entry for letsencrypt renewal daily
23+
cron_entry "letsencrypt-renewal",
24+
ensure => "present",
25+
command => "certbot renewal",
26+
minute => "1",
27+
hour => "23",
28+
user => "$user";
29+
}
1630

1731
Rex::Logger::info("create the cron entry for nightly docker pull");
1832
# create cron entry for nightly docker pull

cmdb/hostname.yml.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ system:
99
email: foo@example.com
1010
# mount point to your docker media|log|config Files. All Data will live here. the specified user above will be granted access to this folder read/write.
1111
baseDir: "/opt/data"
12+
mediaDir: "/opt/media"
1213
composeDir: "/opt/compose"
1314
# the directory where let's encrypt will be installed to
1415
letsencryptDir: "/opt/letsencrypt"

0 commit comments

Comments
 (0)