File tree 2 files changed +7
-7
lines changed
examples/resources/coder_script
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,19 @@ resource "coder_script" "nightly_sleep_reminder" {
33
33
display_name = " Nightly update"
34
34
icon = " /icon/database.svg"
35
35
cron = " 0 22 * * *"
36
- script = << EOF
36
+ script = << EOF
37
37
#!/bin/sh
38
38
echo "Running nightly update"
39
39
sudo apt-get install
40
40
EOF
41
41
}
42
42
43
43
resource "coder_script" "shutdown" {
44
- agent_id = coder_agent. dev . id
45
- display_name = " Stop daemon server"
46
- run_on_stop = true
47
- icon = " /icons/memory.svg"
48
- script = << EOF
44
+ agent_id = coder_agent. dev . id
45
+ display_name = " Stop daemon server"
46
+ run_on_stop = true
47
+ icon = " /icons/memory.svg"
48
+ script = << EOF
49
49
#!/bin/sh
50
50
kill $(lsof -i :3002 -t) >/tmp/pid.log 2>&1 &
51
51
EOF
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ func scriptResource() *schema.Resource {
17
17
return & schema.Resource {
18
18
SchemaVersion : 1 ,
19
19
20
- Description : "Use this resource to run a script from an agent." ,
20
+ Description : "Use this resource to run a script from an agent. When multiple scripts are assigned to the same agent, they are executed in parallel. " ,
21
21
CreateContext : func (_ context.Context , rd * schema.ResourceData , _ interface {}) diag.Diagnostics {
22
22
rd .SetId (uuid .NewString ())
23
23
runOnStart , _ := rd .Get ("run_on_start" ).(bool )
You can’t perform that action at this time.
0 commit comments