diff --git a/src/freedombone-app-turtl b/src/freedombone-app-turtl index a33bd169..3fa6f1a8 100755 --- a/src/freedombone-app-turtl +++ b/src/freedombone-app-turtl @@ -389,16 +389,25 @@ function install_turtl { function_check add_ddns_domain add_ddns_domain $TURTL_DOMAIN_NAME - sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=$HOME/ccl|g' /var/www/$TURTL_DOMAIN_NAME/htdocs/ccl/scripts/ccl - sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=$HOME/ccl|g' /var/www/$TURTL_DOMAIN_NAME/htdocs/ccl/scripts/ccl64 + sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl|g' /usr/bin/ccl + sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl|g' /usr/bin/ccl64 adduser --disabled-login --home=/var/www/$TURTL_DOMAIN_NAME/htdocs --gecos 'turtl' turtl + + cp /usr/local/src/asdf.lisp /var/www/$TURTL_DOMAIN_NAME/htdocs + cp /usr/local/src/quicklisp.lisp /var/www/$TURTL_DOMAIN_NAME/htdocs + echo '(load (compile-file "asdf.lisp"))' > /var/www/$TURTL_DOMAIN_NAME/htdocs/install.lisp + echo '(load (compile-file "quicklisp.lisp"))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/install.lisp + echo '(quicklisp-quickstart:install)' >> install.lisp + echo '(ql:add-to-init-file)' >> install.lisp + chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs + check_architecture=$(uname -a) if [[ "$check_architecture" == *"64"* && "$check_architecture" != *"arm"* ]]; then - su -c '$HOME/ccl/scripts/ccl --load install.lisp --eval "(quit)"' - turtl + su -c '/usr/bin/ccl64 --load install.lisp --eval "(quit)"' - turtl else - su -c '$HOME/ccl/scripts/ccl64 --load install.lisp --eval "(quit)"' - turtl + su -c '/usr/bin/ccl --load install.lisp --eval "(quit)"' - turtl fi echo "(pushnew \"./\" asdf:*central-registry* :test #'equal)" > /var/www/$TURTL_DOMAIN_NAME/htdocs/api/launch.lisp @@ -419,8 +428,8 @@ function install_turtl { echo '(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo ' (when (probe-file quicklisp-init)' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo ' (load quicklisp-init)))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp - echo '(cwd "$HOME/api")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp - echo '(load "$HOME/api/launch")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp + echo '(cwd "~/api")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp + echo '(load "~/api/launch")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp chmod a+w /var/www/$TURTL_DOMAIN_NAME/htdocs chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs