This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Autorun command when starting jail

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

I was wait, I wan'tе to put it on their own, but after writing the rc script, I realized that himbrr confused. Therefore, I advised to remove everything totally, and do it true.
but need also stop procedure for pyLoad - I wait Howto
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Autorun command when starting jail

Post by fsbruva »

jail_proto_exec_prestop=" ????? "

Like this?

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

fsbruva wrote:jail_proto_exec_prestop=" ????? "

Like this?
Yes. Jail need stop his processes, stop itself and only after this procedure nas4free host may continue shutdown.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

alexey123 wrote:jail_proto_exec_prestop=" ????? "
Should I this to the rc.conf.local?

Code: Select all

jail_proto_exec_prestop="/usr/local/bin/python /tmp/pyload/pyLoadCore.py -q"
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

Did I forgot something?
viewtopic.php?f=55&t=1598
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

alexey123
I tried the prestop command, but this wont work correctly.

Added the command:

Code: Select all

nas4free:~#
nas4free:~# /etc/rc.d/jail stop
Stopping jails: proto.domain.local.
nas4free:~# /etc/rc.d/jail start
Configuring jails:.
Starting jails: proto.domain.local.
nas4free:~# jexec 29 pyLoadCore --status
jexec: jail_attach(29): Invalid argument
nas4free:~# jexec 30 pyLoadCore --status
jexec: jail_attach(30): Invalid argument
nas4free:~# jls
   JID  IP Address      Hostname                      Path
You see, the jail is not starting.
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

Behavior FreeBSD / Nas4Free when standup and shutdown you can find in your server - file /etc/default/rc.conf
System read this file and start services as wrote into - and check mask to /etc/rc.conf
Command need be some as written into this file. This is reference.
When system make shutdow procedure it execute /etc/rc.shutdown. This command read /etc/default/rc.conf in reverse order and stop services as it read.

Check section Jail on this large file - it have comments, maximum freebsd.org have manual pages. But please, do not rush.

For check shutdown and start procedures you need enable many logs - in first add to /etc/rc.conf both system, for nas4free over webgui

Code: Select all

rc_debug="YES"	
rc_info="YES"
If you have embedded version - you need change /var/log location from ramdisk to hard disk. And I can not say for sure, I have read, if the system log is stored or cleaned in the process of rebooting.
Also useful to organize the log console
Last edited by alexey123 on 01 Nov 2012 16:55, edited 1 time in total.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

alexey123 wrote: When system make shutdow procedure it execute /etc/rc.shutdown. This command read /etc/default/rc.conf in reverse order and stop services as wrote.
So I have to change /etc/default/rc.conf on the jail?
I don't understand.
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

Oh.... I think it's yet working O.o

Code: Select all

nas4free:~# cat /etc/rc.conf.local
### EXAMPLE - MODIFY TO FIT YOUR NEEDS ###
jail_enable="YES"       # enable jails YES|NO
jail_list="proto"       # name of the jails to start "proto www..."
jail_proto_rootdir="/jail/proto"                # path to our jail
jail_proto_hostname="proto.domain.local"        # hostname
jail_proto_ip="192.168.22.11"           # ip of the jail
jail_proto_interface="re0"              # Network Interface to use, replace on your NAS interface name
jail_proto_devfs_enable="YES"           # use devfs
jail_proto_mount_enable="YES"           # mount YES|NO
jail_proto_fstab="/jail/conf/fstab.proto"       # File with Filesystems to mount
jail_proto_exec_start="/usr/local/bin/python /usr/local/share/pyload/pyLoadCore.py --daemon"
jail_proto_exec_prestop="/usr/local/bin/python /usr/local/share/pyload/pyLoadCore.py -q"

Code: Select all

nas4free:~# /etc/rc.d/jail restart
Stopping jails: proto.domain.local.
Configuring jails:.
Starting jails:j proto.domain.local.
nas4free:~# jls
   JID  IP Address      Hostname                      Path
    32  192.168.22.11   proto.domain.local            /jail/proto
nas4free:~# jexec 32 pyLoadCore --status
85378
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

himbrr wrote:
alexey123 wrote: When system make shutdow procedure it execute /etc/rc.shutdown. This command read /etc/default/rc.conf in reverse order and stop services as wrote.
So I have to change /etc/default/rc.conf on the jail?
I don't understand.
default/rc.conf is reference, not touch it.
If in default file wrote NO, but /etc/rc.conf wrote YES, system do as wrote into /etc/rc.conf.
May be need uncomment some strings
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

Try my /etc/rc.conf.local please.
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

himbrr wrote:Oh.... I think it's yet working O.o
You can see on hardwork Daoyama. Now he upload system, which renewed on 30% codes from 9.1.0.1.394
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

himbrr wrote:Try my /etc/rc.conf.local please.
I can check only nightly - from my home.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

I check.
Also my way is no good - need create user and group for pyload, create folder for user, give permissions and work over rc - scripts and jail's /etc/rc.conf. But I not programmer. I don't know write rc scripts. I make simple, as I know.
I put it into jail's /usr/local/etc folder
script /usr/local/etc/startall.sh

Code: Select all

#!/bin/sh
/bin/sh /etc/rc
/usr/local/bin/python /tmp/pyload/pyLoadCore.py --daemon
For add next software for jail - just add line for start added software

script /usr/local/etc/stopall.sh

Code: Select all

#!/bin/sh
/usr/local/bin/python /tmp/pyload/pyLoadCore.py -q
jail_proto_exec_stop="/bin/sh /etc/rc.shutdown"
Additional software need be added in first line

And into NAS4Free folder /etc/rc.conf.local I add line and edit jail_proto_exec_start= variable

Code: Select all

jail_proto_exec_start="/bin/sh /usr/local/etc/startall.sh"
jail_proto_exec_stop="/bin/sh /usr/local/etc/stopall.sh"
As for me - work. I test any reboots with debug.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

Code: Select all

jail_proto_exec_prestop="/usr/local/bin/python /tmp/pyload/pyLoadCore.py -q"
This don't work for you? On my machine this works perfectly.
So you don't have to write a script. This should be easier for users.
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

himbrr wrote:

Code: Select all

jail_proto_exec_prestop="/usr/local/bin/python /tmp/pyload/pyLoadCore.py -q"
This don't work for you? On my machine this works perfectly.
jail_proto_exec_prestop command I not find into /etc/default/rc.conf :shock:

I make symple test. I enable debug into host and into jail, then make reboot for host.
After reboot I compare logs from nas4free and jail - what both devices do in time shutdown and startup. And compare times.

So you don't have to write a script. This should be easier for users.
All users are villains who only want to break the system. :!: They dream to do so, even when sleeping ;) . We have to get in their way - for example to prohibit unauthorized processes run as root.
Also all building must be nice - in case nas4free:
  • .pid file must be at /var/run/.
    .log file must be as circular log at /var/log/. and have interface for view
    installed extention must be have webpanel from webgui for manage. See my SnmpViewer. I can work without it, but now I hack device/windows more faster
For example: In my case pyload have into jail /root/pyload folder, and when allow manage it over <jailip>:7227 (I don't remember exactly, you can find remote port in .conf file) you can add to nas4free webgui page for management.
But before do it, need create extension page for jail
yet let it work, I do not mind
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

The remote port 7227 is used by the android app.
For webgui you have to use port 8000.
If you want to use click'n'load on you local machine, you have to forward localhost:9666 to pyloadhost:9666.

Integration to the nas4free webgui would be nice, but I'm not a developer. Maybe another one could write the extension?
With phpmyadmin this was easy. Only link to www/phpmyadmin .. but create a link to the jail's ip and port 8000 is not so easy I think.
Would it be a good idea to create a route on nas4free for this three ports, to reach pyload over the nas4free ip?
192.168.22.9:8000 forward to 192.168.22.11:8000
remember I only installed pyload on jail, because I can't the required packages on nas4free host.
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Autorun command when starting jail

Post by fsbruva »

alexey123 wrote: jail_proto_exec_prestop command I not find into /etc/default/rc.conf :shock:
The prestop and poststart commands can actuallybe prioritized to make life easier - jail_proto_exec_prestop{0,1,2}.
alexey123 wrote: All users are villains who only want to break the system. :!: They dream to do so, even when sleeping ;) .
Excellent point!
alexey123 wrote: But before do it, need create extension page for jail
yet let it work, I do not mind
I am working on it!!!! :oops:

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

fsbruva wrote:
alexey123 wrote: jail_proto_exec_prestop command I not find into /etc/default/rc.conf :shock:
The prestop and poststart commands can actuallybe prioritized to make life easier - jail_proto_exec_prestop{0,1,2}.
As for me - not working. May be I not with 2 left hands. My test. I create jailed /tmp/jail.log and add some lines to my shutdown script.

Code: Select all

#!/bin/sh
date >> /tmp/jail.log
echo before_stop >> /tmp/jail.log
/usr/local/bin/python /tmp/pyload/pyLoadCore.py -q
date >> /tmp/jail.log
echo pyloadstoped_shutdown >> /tmp/jail.log
jail_proto_exec_stop="/bin/sh /etc/rc.shutdown"
Output after I execute /etc/rc.d/jail restart is

Code: Select all

nas# cat /jail/proto/tmp/jail.log
Fri Nov  2 22:01:34 IST 2012
before_stop
Fri Nov  2 22:01:34 IST 2012
pyloadstoped_shutdown
But jail_proto_exec_prestop I can't write any into file - echo only write to console in case command

Code: Select all

jail_proto_exec_prestop0="echo jail_prestoped >> /tmp/jail.log"
it write

Code: Select all

nas:~# /etc/rc.d/jail restart
Stopping jails:jail_prestoped >> /tmp/jail.log
 proto.domain.local.
Configuring jails:.
Starting jails: proto.domain.local.
nas:~#
May be it know only run script, and into script I need add command?
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Autorun command when starting jail

Post by fsbruva »

I re-read the documentation, and the prestop command is run OUTSIDE the jail. Furthermore, the jexec command AUTOMATICALLY re-pipes the output from the jexec'd command (echo, in your case, alexey) back to the standard output (console) of the HOST. Thus, it is impossible to get jexec 3 echo to be piped into a file by the jail. The echo would be carried out by the jail, but the redirection (>> or > or |) would be carried out by the host.

That being said, everything that follows the jid in the jexec call is passed to the jail as a command, and it is interpreted by the jail's shell. Still, however, jexec requires a jid, which is hard to know within the rc.conf.local file. My recommendation do what alexey suggested - create a custom shutdown script within the jail that stops the pyloader daemon, then executes the rc.shutdown script. However, an rc.d script wouldn't be a bad idea - with start, stop and restart functions. It can be created via the web gui once you get that going!

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

So, if I declare in rc.conf.local

Code: Select all

jail_proto_exec_prestop0="/any_place/prestop.sh"
and write into file

Code: Select all

echo jail_prestoped >> /tmp/jail.log
, it will be work. Hmmmm, I think If you do all correctly, need to write rc-script with "start", "stop", "restart", "safestart" functions, create user "downloader", home folder for it, with permissions...
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Autorun command when starting jail

Post by fsbruva »

alexey123 wrote:So, if I declare in rc.conf.local

Code: Select all

jail_proto_exec_prestop0="/any_place/prestop.sh"
Not really.... That line will have the same effect as doing this from the shell on the host:

Code: Select all

sh /jail/proto/any_place/prestop.sh
If you want the command to be run WITHIN the jail prior to its shutdown, then I would go back to the rc script idea.

The rc script would live in /jail/proto/etc/rc.d, and be named pyloader

Code: Select all

#!/bin/sh

# PROVIDE: pyloader
# REQUIRE: DAEMON cleanvar zfs
# KEYWORD: shutdown

. /etc/rc.subr

name="pyloader"
rcvar="pyloader_enable"

start_cmd="/usr/local/bin/python /tmp/pyload/pyLoadCore.py --daemon"
stop_cmd="/usr/local/bin/python /tmp/pyload/pyLoadCore.py -q"

load_rc_config $name
run_rc_command "$1"
Then you could test that it works from within the jail /etc/rc.d/pyloader stop. Also, then you put pyloader_enable="YES" inside jail's rc.conf. Easy?

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

# REQUIRE: DAEMON
Not be work. May be work # REQUIRE: LOGIN
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Autorun command when starting jail

Post by fsbruva »

Does that rc script work from the commandline, at least? I have a feeling his previous autostart problems were because DAEMON was misspelled as DEAMON.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Autorun command when starting jail

Post by alexey123 »

fsbruva wrote:Does that rc script work from the commandline, at least? I have a feeling his previous autostart problems were because DAEMON was misspelled as DEAMON.
Oups.

I absolutely do not care what will run any program, I just want to make a order.
If the program is described in the /etc/default/rc.conf then let rise as there is written, if undescribed - that after the run the main processes. And strictly in reverse order - shutting down processes.
In this case - I will repair my Minecraft Howto
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

alexey's script is working for me fine ;)
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Autorun command when starting jail

Post by fsbruva »

Which script? The shell?

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

Yes... the startall.sh and stopall.sh
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Autorun command when starting jail

Post by himbrr »

Extension menu entry:

Code: Select all

mkdir /usr/local/www/ext/pyload
echo '<a href="http://[youJailIP]:8000" target="_blank">pyLoad</a>' > /usr/local/www/ext/pyload/menu.inc
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

Post Reply

Return to “Jails”