Skip to content

Commit c391f8d

Browse files
authored
Improve logging
1 parent 6d03403 commit c391f8d

4 files changed

+15
-6
lines changed

AmazonLinux-2-LAMP-server.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: Amazon Linux 2 ( https://github.com/aws-samples/ec2-lamp-server )
2+
Description: Amazon Linux 2 ( https://github.com/aws-samples/ec2-lamp-server ) (uksb-014citd1s9) (tag:AL2)
33
Transform: "AWS::LanguageExtensions"
44

55
Metadata:
@@ -1286,7 +1286,7 @@ Resources:
12861286
After=default.target network.target
12871287
12881288
[Service]
1289-
ExecStart=/opt/dcv-post-reboot.sh
1289+
ExecStart=/bin/sh -c "/opt/dcv-post-reboot.sh 2>&1 | tee -a /var/log/install-sw.log"
12901290
12911291
[Install]
12921292
WantedBy=default.target

AmazonLinux-2023-LAMP-server.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: Amazon Linux 2023 ( https://github.com/aws-samples/ec2-lamp-server )
2+
Description: Amazon Linux 2023 ( https://github.com/aws-samples/ec2-lamp-server ) (uksb-014citd1s9) (tag:AL2023)
33
Transform: "AWS::LanguageExtensions"
44

55
Metadata:
@@ -1136,7 +1136,7 @@ Resources:
11361136
After=default.target network.target
11371137
11381138
[Service]
1139-
ExecStart=/opt/dcv-post-reboot.sh
1139+
ExecStart=/bin/sh -c "/opt/dcv-post-reboot.sh 2>&1 | tee -a /var/log/install-sw.log"
11401140
11411141
[Install]
11421142
WantedBy=default.target

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ The following are available on **Outputs** section
9898
#Native DCV clients can be downloaded from [https://www.amazondcv.com/](https://www.amazondcv.com/). Web browser client can be disabled by removing `nice-dcv-web-viewer` package.
9999

100100

101+
### Troubleshooting
102+
To troubleshoot any installation issue, you can view contents of the following log files (if available)
103+
- `/var/log/cloud-init-output.log`
104+
- `/var/log/install-cfn-helper.log`
105+
- `/var/log/install-sw.log`
106+
- `/var/log/install-php.log`
107+
- `/var/log/install-lamp.log`
108+
- `/var/log/install-dcv.log`
109+
101110
## PHP performance configuration
102111
Based on public articles about PHP performance (many thanks to the authors), the following enhancements were made:
103112

UbuntuLinux-LAMP-server.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: Ubuntu Linux ( https://github.com/aws-samples/ec2-lamp-server )
2+
Description: Ubuntu Linux ( https://github.com/aws-samples/ec2-lamp-server ) (uksb-014citd1s9) (tag:Ubuntu)
33
Transform: "AWS::LanguageExtensions"
44

55
Metadata:
@@ -1268,7 +1268,7 @@ Resources:
12681268
After=default.target network.target
12691269
12701270
[Service]
1271-
ExecStart=/opt/dcv-post-reboot.sh
1271+
ExecStart=/bin/sh -c "/opt/dcv-post-reboot.sh 2>&1 | tee -a /var/log/install-sw.log"
12721272
12731273
[Install]
12741274
WantedBy=default.target

0 commit comments

Comments
 (0)