Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
sysadmin
/
acme-ssl
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 757cd11d
authored
Nov 17, 2016
by
Никита Миропольский
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cron in install, remove old versions
1 parent
81328093
Pipeline
#1986
for
757cd11d
skipped
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
20 deletions
acme-crontab
install.sh
acme-crontab
View file @
757cd11
# cron.d format:
# m h dom m dow user command
0 3 26 * * root /usr/local/bin/acme-refresh >> /var/log/acme.log 2>&1
# crontab format:
# m h dom m dow command
0 3 26 * * /usr/local/bin/acme-refresh >> /var/log/acme.log 2>&1
install.sh
View file @
757cd11
#!/usr/bin/env bash
echo
"Пример конфигурации nginx:"
echo
"=========================="
cat ./nginx.conf
echo
"=========================="
echo
echo
"Пример кронтаба:"
echo
"=========================="
cat ./acme-crontab
echo
"=========================="
echo
echo
Устанавливаю файлы:
echo
# проверить root
if
[
"
$(
id -u
)
"
!
=
"0"
]
;
then
echo
"Недостаточно прав для установки."
1>&2
exit
1
fi
set
-e
set
-x
# ставим сюда
PREFIX
=
/usr/local/bin
...
...
@@ -28,6 +17,18 @@ cp ./acme-init $PREFIX/acme-init
cp ./acme-refresh
$PREFIX
/acme-refresh
cp ./acme-client
$PREFIX
/acme-client
if
[[
-f
$PREFIX
/acme_init
]]
;
then
rm
$PREFIX
/acme_init
rm
$PREFIX
/acme_refresh
rm
$PREFIX
/acme_client
fi
if
[[
-d /etc/cron.d
]]
;
then
cp ./acme-crontab /etc/cron.d/acme
else
echo
папка /etc/cron.d отсутствует, установите крон вручную
fi
# конфиг перезаписывать не нужно
if
[[
! -f /etc/acme.conf
]]
;
then
cp ./acme.conf /etc/acme.conf
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment