Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change install log location and restrict permissions #74

Merged
merged 21 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:

env:
GOLANGCI_LINT_VERSION: 'v1.46.2'
NFPM_VERSION: 'v2.18.0'
GOLANGCI_LINT_VERSION: 'v1.49.0'
NFPM_VERSION: 'v2.18.1'

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contents:
- src: nginx-agent.conf
dst: /etc/nginx-agent/nginx-agent.conf
file_info:
mode: 0660
mode: 0640
- src: ./scripts/packages/nginx-agent.service
dst: /etc/systemd/system/nginx-agent.service
- src: ./scripts/selinux/nginx_agent_selinux.8.gz
Expand Down
2 changes: 1 addition & 1 deletion scripts/.local-nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contents:
- src: nginx-agent.conf
dst: /etc/nginx-agent/nginx-agent.conf
file_info:
mode: 0660
mode: 0640
- src: ./scripts/packages/nginx-agent.service
dst: /etc/systemd/system/nginx-agent.service
- src: ./scripts/selinux/nginx_agent_selinux.8.gz
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/apk/cert.pem \
nginx-agent \
" \
&& apk update \
&& apk add $nginxPackages
&& apk add $nginxPackages

# run the nginx and agent
FROM install as runtime
Expand Down
2 changes: 1 addition & 1 deletion scripts/packages/nginx-agent
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ start_cmd="start_agent"
stop_cmd="stop_agent"
status_cmd="status_agent"


start_agent() {
PATH=$PATH:/usr/local/sbin
mkdir -p /var/log/nginx-agent
/usr/sbin/daemon -f -p ${pidfile} ${command}
}

Expand Down
1 change: 1 addition & 0 deletions scripts/packages/packager/local-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mkdir -p /staging/usr/local/etc/rc.d

cp nginx-agent.conf /staging/usr/local/etc/nginx-agent
cp scripts/packages/nginx-agent /staging/usr/local/etc/rc.d
cp scripts/packages/preinstall.sh /staging/+PRE_INSTALL
cp scripts/packages/postremove.sh /staging/+PRE_DEINSTALL
cp scripts/packages/postinstall.sh /staging/+POST_INSTALL
cp scripts/packages/plist /staging
Expand Down
1 change: 1 addition & 0 deletions scripts/packages/packager/signed-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mkdir -p staging/usr/local/etc/rc.d

cp nginx-agent.conf staging/usr/local/etc/nginx-agent
cp scripts/packages/nginx-agent staging/usr/local/etc/rc.d
cp scripts/packages/preinstall.sh /staging/+PRE_INSTALL
cp scripts/packages/postremove.sh staging/+PRE_DEINSTALL
cp scripts/packages/postinstall.sh staging/+POST_INSTALL
cp scripts/packages/plist staging
Expand Down
Loading