Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : recipe

2


Threaded Mode | Print  

recipe
tashkas
Group: NOC
Post Group: Newbie
Posts: 24
Status:
no output
IP: --   

recipe
gamingserv
Group: Member
Post Group: Newbie
Posts: 5
Status:
Simple recipes dont work for my....
Code

#!/bin/sh
sleep 30
apt install htop -y
IP: --   

recipe
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
Please remove the first line
Code
#!/bin/sh
It is added automatically.

Edited by wolke : March 31, 2019, 11:54 am
IP: --   

recipe
tashkas
Group: NOC
Post Group: Newbie
Posts: 24
Status:
is it possible to make run script on first ssh login?
IP: --   

recipe
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
Not with the built in function.
The following will work only with ssh login with key, not password.
1.add a "command=/path/to/your/script" at the end of your access key stored in authorized_keys.
2. Add a recipe in virtualizor that writes your desired script to the path above and issue a

Code
chmod +x /path/to/your/script

3. Whenever there is a login with the matched key, the script will be executed.
If you only needs this to run ONCE, you need to delete the script and change the key (remove the command=" sectionl. The script can also delete itself with simple

Code
rm /path/to/your/script

command as last line.
That´s just a suggestion which can be refined further.

IP: --   

recipe
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
FYI: as of today (Virtualizor release 3), recipe can be executed on vm rebuild also. That was not possible before.
IP: --   

recipe
m3gatr0n
Group: Member
Post Group: Newbie
Posts: 1
Status:
Where I can find some documentation related to it.
I would like to know if I can use variables inside recipe like user email address or something.
Also I would like to know at which run-level the recipe will run.
IP: --   

recipe
miyabhai101
Group: Member
Post Group: Newbie
Posts: 2
Status:

Thank you very much for sharing

-----------------------
tubemate mobdro authorityapk
IP: --   

recipe
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
@m3gatr0n
   

a recipe is a shell script which is running under the root user the same way as if it has been started locally on a console.
IP: --   

« Previous    Next »

Threaded Mode | Print  

2


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 16, 2024, 8:04 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.174