517 questions
1
vote
2
answers
68
views
Get post's author data in a shortcode within the WordPress loop
I am building a block theme for Wordpress.
I wrote a shortcode function that is supposed to output the message "By [author's display name with author's link]".
More specifically, I am trying ...
-1
votes
0
answers
30
views
Terraform user data script for EC2 instance failed while running aws configure command
I faced up with a situation when EC2 user_data script failed with Python RuntimeError.
User_data script:
#!/bin/bash
sudo apt-get -q update && sudo apt-get -q upgrade
sudo snap install kubectl ...
2
votes
0
answers
57
views
Set WooCommerce billing country based on WPML current language
I am using the following code to change WooCommerce billing country to the selected site language.
add_filter('init', function() {
$lang = apply_filters( 'wpml_current_language', NULL );
$...
0
votes
1
answer
65
views
Use WooCommerce account name and email instead of billing name and email for invoices and email notifications
I want to use the WordPress account User Name on the customer emails and admin order notifications instead of the Billing Name.
Our use case is that employees are enrolling for an online course. They ...
0
votes
0
answers
42
views
Issue retrieving from field in Facebook Graph API for users, only working for page authors
I am trying to retrieve the from field for comments on a post using the Facebook Graph API. The from field is showing correctly for page authors but not for regular users who comment on the post.
I ...
0
votes
0
answers
106
views
Should the runcmd under user-data section or is it a top level key?
I'm working on a cloud-config autoinstall YAML to install Ubuntu 22.04, but I'm encountering some unexpected behaviors. I've noticed that placing write-files and runcmd as top-level keys doesn't seem ...
0
votes
1
answer
158
views
How to terminate EC2 instance if `user-data` script exits with not-zero status code?
So EC2 was created but user-data failed, eg. syntax error, some command failed etc.
How to terminate such instance automatically if a user-data run was not successful?
0
votes
0
answers
91
views
Google Play Console Violation: Invalid Data Safety Form - How to Resolve Discrepancies?
I recently received a violation notice from Google Play Console regarding the Data safety section of my app's listing. The details are as follows:
Violation:
Data safety section in Google Play User ...
0
votes
1
answer
113
views
Cannot install nvm with user-data on AWS ec2 ubuntu server
I am trying to update Nodejs to the latest version with nvm in the user-data section on AWS ec2 ubuntu server. But somehow it doesn't update Nodejs to the latest version. Everything works fine via the ...
1
vote
1
answer
88
views
Fatal Error when calling woocommerce_customer_save_address action hook
I hope you can help. I am getting a strange issue and not sure how to solve it. I'm familiar with calling actions, but I am getting a fatal error when calling a standard woo hook that is empty.
I'm ...
0
votes
0
answers
85
views
ASOP Cuttlefish clears userdata.img every time it starts
Why does asop cuttlefish clear the userdata.img every time it starts?Here is my console output:
I couldn't find the answer even after checking the Cuttlefish official website. Are there any issues ...
2
votes
1
answer
97
views
Display user data in a new column on WooCommerce admin order list (+ HPOS)
I want to add my field as new column in all orders table in backend. I have tried the following but its not displaying. Anyone know about this? Please help.
// Add custom column to orders list table
...
0
votes
0
answers
78
views
How to assign an order number as a login password for store users? (WooCommerce)
Good afternoon. I need to change the login method for my Woocommerce store clients.
I’m using WooCommerce to book rooms. Is it possible to automatically create a customer account based on one order?
I ...
0
votes
0
answers
229
views
Want to use user_data (hardening script) for EKS nodegroups with EKS module (Hashicorp provided)
I have written shell script to harden EKS worker during worker node bootstrapping. I am using EKS module (https://github.com/terraform-aws-modules/terraform-aws-eks).
eks_managed_node_groups = {
ng-...
0
votes
0
answers
161
views
AWS EC2 `ssh: connect to host ec2-{ip}.compute-1.amazonaws.com port 22: Connection refused` only if `user-data` uses `systemctl` commands
AWS Setup
I have a AWS EC2 instance running with:
t4g.nano
al2023-ami-2023.3.20240122.0-kernel-6.1-arm64 (AL2023)
a Security Group setup to allow SSH from my personal IP address
sshd is installed &...
2
votes
1
answer
364
views
Additional column in WooCommerce admin order list with the user login
I need to add a custom column "Customer" in the backend of WooCommerce orders list.
Here is some code that add additional columns to admin orders list and displays the user ID:
add_filter( '...
1
vote
1
answer
63
views
Get the author's username using PHP in WordPress [duplicate]
I need to call in the username of a post's author.
I have tried WordPress: get author info from post id answer code.
I have added the code in the post loop, echoing $display_name.
It works, but not ...
0
votes
1
answer
663
views
Auto create an user account after payment and auto login in WooCommerce
After others' previous questions, I have a question here: Automatically create an user account after WooCommerce checkout and auto login
First question:
How in this section that the message (Thank you....
1
vote
1
answer
70
views
From user table data doesn't retrive in hostinger
I used the following script, retrieve the user ID from user table on WordPress. This script is working local server, all other server. But this is not working in the Hostinger server.
Why this is not ...
-2
votes
1
answer
380
views
Get IPs as string/list in Terraform
I'm beginning by creating a few machines:
resource "aws_instance" "servers" {
count = 20
instance_type = "t2.micro"
...........................
}
and then, I want ...
0
votes
1
answer
88
views
Zero-Acccess Encryption and "Forgot Password" section
I'm currently creating a "Google Docs" alternative using Symfony, but made for privacy. To "certify" the confidentiality of user data, I'm interested in the "Zero-Access" ...
0
votes
1
answer
115
views
Why is AWS user-data HTTP endpoint incorrect?
I'm trying to debug a Spinnaker pipeline that is not properly injecting my userdata to a Windows EC2 instance. For testing, I launched one with a simple base64 encoded userdata script like this:
<...
0
votes
1
answer
398
views
Handling JSON string in EC2 userdata
I am trying to provision an EC2 instance using terraform, passing a cloudinit configuration file as userdata to the instance.
As part of the cloudinit config I am setting environment variables and ...
0
votes
1
answer
216
views
How to access user information in a ReactJS SPA application?
How i can store user information in a ReactJS SPA application?
Let me explain, I have a REST API which sends me a cookie when connecting. It can be a sessionID or a JWT.
I would like to retrieve the ...
0
votes
0
answers
46
views
Unable to map a string value passed in Terraform with text value in Jenkins
I am trying to pass AWS EC2 Userdata in Jenkins as a variable.
Source code is in terraform, main.tf as shown below:
userdata = var.web_userdata`
variables.tf:
`variable "web_userdata" {
...
0
votes
0
answers
20
views
Getting zero record in user meta data in wordpress
I am trying to get user list with specifice role and who is register between two date. I tried But getting zero record (**it has record in database **)in result.
$meta_query = array('relation' => '...
0
votes
1
answer
735
views
docker not installed through yum in user data
this is how my user data looks like, but docker is not installed, when connecting to my ec2 machine:
sudo yum -y install docker
sudo service docker start
sudo docker pull nginx
sudo docker run -d -p ...
0
votes
1
answer
385
views
How can I pass AWS lambda environement variable into userdata script (script will fire during ec2 spinup)
In my aws lambda/python script, I am intending to call a environment variable into my userdata script which will run during instance spinup, but I am facing issue passing environment variable into my ...
0
votes
2
answers
14k
views
How to check if a key exists in terraform map, within user_data template code?
I would like to check if I need to run an installation script stored in the s3 bucket.
If the configuration does have an s3 bucket, then download and run the installer
in my variables.tf, I have
...
0
votes
1
answer
55
views
cloudinit output shows eipalloc-09e7274dd3c641ae6: value too great for base (error token is "09e7274dd3c641ae6")
I'm trying to associate the Elastic IP address with Auto scaling group, so whenever the autoscaling triggers it will automatically associate with the EIP.
For this I'm trying to add the script in user ...
1
vote
1
answer
843
views
Terraform throwing this error Getting Extra characters after interpolation expression;
I'm trying to associate the Elastic IP address with Auto scaling group, so whenever the autoscaling triggers it will automatically associate with the EIP.
For this I'm trying to add the script in ...
0
votes
1
answer
975
views
How to add a powershell script/command as userdata for Windows VMs in Azure
I am trying out the feature of userdata provided by Azure to pass scripts/metadata to VMs running on Azure.
For Linux VMs, I have tried passing a bash script, which involves creating a file. But I am ...
1
vote
1
answer
90
views
IOS Backend for User Data [closed]
I am brand new to ios development and am looking for some advice on the best way to structure my user data and access it throughout my app.
Data is retrieved via HTTPS requests that query a database ...
0
votes
1
answer
75
views
Cisco CSR user-data bootstrap to allow multiline in banner
The user data format for the IOS appliance uses the following:
ios-config-0001="hostname test-csr-deployment-001"
ios-config-0002="banner exec |Hostname: test-csr-deployment-001\r\...
0
votes
1
answer
105
views
Capturing Data of a User Visiting my website
How can I capture data of someone visiting my website via a shortened link? I want to be able to capture the OS, IP, divide ID etc. Would capturing the user agent string be the best option? What are ...
0
votes
1
answer
903
views
Executing npm install in user data
I am attempting to create a launch template in aws with the following in the user data
#!/bin/bash
home=/home/ec2-user
nodev='8.11.2'
nvmv='0.33.11'
#install node
su - ec2-user -c "curl
https://...
0
votes
0
answers
288
views
Acces Terraform user-data variables through a Powershells script running on an EC2
I'm working on automating some software installation on Windows AWS EC2. My infrastructure as a dev environment and a prod environment. So to handle that i'm trying to pass through user data some ...
1
vote
0
answers
98
views
AWS User Data Script - Dependency Installation Failure
I have a simple user_data script that I am applying to am aws_launch_template inside of a terraform module.
resource "aws_launch_tempalte "host" {
...
user_data = filebase64(".....
1
vote
1
answer
2k
views
User-data not working when starting EC2 instance
I am trying to run simple user data by following below link in my company's AWS EC2 server :
https://aws.amazon.com/premiumsupport/knowledge-center/execute-user-data-ec2/
user data is not working, ...
1
vote
1
answer
1k
views
AWS EC2 User Data to run python script is not working
I am trying to run a python script on EC2 Linux machine. All I want is on every start of the instance it should run this python script/file called my_file.py. it's in my ec2-user directory. I also ...
2
votes
0
answers
155
views
How to check if AWS AMI support cloud-init?
In AWS Console when launching an instance with any image I get "user data" field to fill in optionally to be later executed by cloud-init. However, not all images support cloud-init. How do ...
0
votes
1
answer
3k
views
Windows EC2 User Data Not Executing
The problem:
We need to execute a Powershell script using Userdata on a Windows AWS EC2 instance so that we can join and unjoin our domain's activity directory. The EC2 Userdata log shows the instance ...
0
votes
1
answer
32
views
Node MVC user data modelling - linking records to the current user
I've set up a user model for an application. I would like each user to have access to their own records after they've logged in, e.g. orders, customers, etc. How best to implement this?
My only idea ...
0
votes
1
answer
882
views
AWS EC2 userdata giving "No such file or directory" error
I am trying to run the following in my userdata while creating ec2.
sudo yum update -y
sudo amazon-linux-extras install ansible2 -y
ssh-keygen -q -t rsa -f /home/ssm-user/.ssh/id_rsa -N ''
However, ...
0
votes
1
answer
546
views
how to fetch aws secret to use as mysql password to run a docker container and pass the credential
i am trying to achieve a scenario where i would like to run a docker container using user-data in aws whenever the instance is stopped and start. I am not able to set the environment variable
using &...
1
vote
2
answers
3k
views
"Invalid function argument" with Userdata in Terraform
I'm trying to pass user data over a file so the code will look less clumsy, but having trouble. I've tried all the different combinations but nothing is working.
I went through the Terraform ...
1
vote
0
answers
66
views
How to upload a file in wear OS to the cloud using wifi?
I am trying to create an app for wear OS in which user data is stored as a text file. Now, I want to collect this data and figure out a method using which the user uploads this data to the cloud using ...
6
votes
1
answer
3k
views
Terraform user_data output in terraform output
I creating EC2 instance with Terraform, which includes also user_data, my question is can I see the output of linux command from user_data in terraform output.
Ex.
....
user_data = <<EOF
echo &...
-1
votes
1
answer
574
views
added user-data script is not working after editing , but found working user-data while lauching a fresh EC2 instance
My user-data script for installing Nginx was found to be working on a new launch of the EC2 instance. After launching the ec2 instance, I further added a PHP installation script by editing the user-...
0
votes
1
answer
223
views
Copy user meta to order meta on user profile update
I have a user meta field ('pkg_code') I would like to copy to a custom field ('log') on the users' order(s) upon update of their user profile.
I have looked through many similar posts on stackoverflow ...