Advertisement
Monarch73

chroot bash script

Nov 5th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. #/bin/bash
  2. export HOME=/root
  3. export LC_ALL=C
  4. export LANGUAGE=C
  5. if mountpoint /proc; then
  6.         mount --bind /dev dev/
  7.         chroot . /startme.sh
  8. else
  9.         mount none -t proc /proc
  10.         mount none -t sysfs /sys
  11.         mount none -t devpts /dev/pts
  12.         /etc/init.d/ssh start
  13.         /etc/init.d/mysql start
  14.         cd /var/www/redmine
  15.         screen -dmS redmine bundle exec rails server webrick -e production -p 80 -b 0.0.0.0
  16.         /bin/bash -i
  17. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement