Changes for full system-less

This commit is contained in:
geofferey 2019-06-22 15:36:59 +00:00
parent b582d22cab
commit cbfd394ee9
4 changed files with 30 additions and 15 deletions

View file

@ -13,7 +13,7 @@ HOME=/mnt
CLOUDROOTMOUNTPOINT=$HOME/cloud/ CLOUDROOTMOUNTPOINT=$HOME/cloud/
mkdir -p $CLOUDROOTMOUNTPOINT mkdir -p $CLOUDROOTMOUNTPOINT
$MODDIR/system/bin/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: | $MODDIR/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: |
while read line; do while read line; do
echo "UNmounting... $line" echo "UNmounting... $line"
umount -f ${CLOUDROOTMOUNTPOINT}/${line} umount -f ${CLOUDROOTMOUNTPOINT}/${line}

View file

@ -23,11 +23,11 @@ mkdir -p /storage/cache-backend/
#sh -c "$MODDIR/system/bin/rclone mount piyushDOTgarg_shopDOTmega: ${CLOUDROOTMOUNTPOINT}/piyushDOTgarg_shopDOTmega -vv --config ${CONFIGFILE} --attr-timeout 10m --cache-dir=/storage/cache --vfs-cache-mode writes --vfs-cache-max-age 168h0m0s --log-file /sdcard/dns.log --allow-other --gid 1015" & #sh -c "$MODDIR/system/bin/rclone mount piyushDOTgarg_shopDOTmega: ${CLOUDROOTMOUNTPOINT}/piyushDOTgarg_shopDOTmega -vv --config ${CONFIGFILE} --attr-timeout 10m --cache-dir=/storage/cache --vfs-cache-mode writes --vfs-cache-max-age 168h0m0s --log-file /sdcard/dns.log --allow-other --gid 1015" &
$MODDIR/system/bin/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: | $MODDIR/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: |
while read line; do while read line; do
echo "mounting... $line" echo "mounting... $line"
mkdir -p ${CLOUDROOTMOUNTPOINT}/${line} mkdir -p ${CLOUDROOTMOUNTPOINT}/${line}
$MODDIR/system/bin/rclone mount ${line}: ${CLOUDROOTMOUNTPOINT}/${line} --config ${CONFIGFILE} --max-read-ahead ${READAHEAD} --buffer-size ${BUFFERSIZE} --dir-cache-time ${DIRCACHETIME} --poll-interval 5m --attr-timeout ${DIRCACHETIME} --vfs-cache-mode writes --vfs-read-chunk-size 2M --vfs-read-chunk-size-limit 10M --vfs-cache-max-age 168h0m0s --vfs-cache-max-size ${CACHEMAXSIZE} --cache-dir=/storage/cache --cache-chunk-path /storage/cache-backend/ --cache-chunk-clean-interval 10m0s --log-file /sdcard/dns.log --allow-other --gid 1015 --daemon $MODDIR/rclone mount ${line}: ${CLOUDROOTMOUNTPOINT}/${line} --config ${CONFIGFILE} --max-read-ahead ${READAHEAD} --buffer-size ${BUFFERSIZE} --dir-cache-time ${DIRCACHETIME} --poll-interval 5m --attr-timeout ${DIRCACHETIME} --vfs-cache-mode writes --vfs-read-chunk-size 2M --vfs-read-chunk-size-limit 10M --vfs-cache-max-age 168h0m0s --vfs-cache-max-size ${CACHEMAXSIZE} --cache-dir=/storage/cache --cache-chunk-path /storage/cache-backend/ --cache-chunk-clean-interval 10m0s --log-file /sdcard/dns.log --allow-other --gid 1015 --daemon
sleep 5 sleep 5
done done

View file

@ -5,6 +5,21 @@
# This will make sure your module will still work # This will make sure your module will still work
# if Magisk change its mount point in the future # if Magisk change its mount point in the future
MODDIR=${0%/*} MODDIR=${0%/*}
IMG=/sbin/.core/img
id=rclone-mount
if [ -d $IMG/$id ]; then
ln -sf $IMG/$id/rclone /sbin/rclone
ln -sf $IMG/$id/fusermount /sbin/fusermount
else
ln -sf $MODDIR/rclone /sbin/rclone
ln -sf $MODDIR/fusermount /sbin/fusermount
fi
sleep 120 sleep 120
echo "mounting remotes..." echo "mounting remotes..."
#RCLONE PARAMETERS #RCLONE PARAMETERS
@ -22,11 +37,11 @@ mkdir -p /storage/cache-backend/
#sh -c "$MODDIR/system/bin/rclone mount piyushDOTgarg_shopDOTmega: ${CLOUDROOTMOUNTPOINT}/piyushDOTgarg_shopDOTmega -vv --config ${CONFIGFILE} --attr-timeout 10m --cache-dir=/storage/cache --vfs-cache-mode writes --vfs-cache-max-age 168h0m0s --log-file /sdcard/dns.log --allow-other --gid 1015" & #sh -c "$MODDIR/system/bin/rclone mount piyushDOTgarg_shopDOTmega: ${CLOUDROOTMOUNTPOINT}/piyushDOTgarg_shopDOTmega -vv --config ${CONFIGFILE} --attr-timeout 10m --cache-dir=/storage/cache --vfs-cache-mode writes --vfs-cache-max-age 168h0m0s --log-file /sdcard/dns.log --allow-other --gid 1015" &
$MODDIR/system/bin/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: | $MODDIR/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: |
while read line; do while read line; do
echo "mounting... $line" echo "mounting... $line"
mkdir -p ${CLOUDROOTMOUNTPOINT}/${line} mkdir -p ${CLOUDROOTMOUNTPOINT}/${line}
$MODDIR/system/bin/rclone mount ${line}: ${CLOUDROOTMOUNTPOINT}/${line} --config ${CONFIGFILE} --max-read-ahead ${READAHEAD} --buffer-size ${BUFFERSIZE} --dir-cache-time ${DIRCACHETIME} --poll-interval 5m --attr-timeout ${DIRCACHETIME} --vfs-cache-mode writes --vfs-read-chunk-size 2M --vfs-read-chunk-size-limit 10M --vfs-cache-max-age 168h0m0s --vfs-cache-max-size ${CACHEMAXSIZE} --cache-dir=/storage/cache --cache-chunk-path /storage/cache-backend/ --cache-chunk-clean-interval 10m0s --log-file /sdcard/dns.log --allow-other --gid 1015 --daemon $MODDIR/rclone mount ${line}: ${CLOUDROOTMOUNTPOINT}/${line} --config ${CONFIGFILE} --max-read-ahead ${READAHEAD} --buffer-size ${BUFFERSIZE} --dir-cache-time ${DIRCACHETIME} --poll-interval 5m --attr-timeout ${DIRCACHETIME} --vfs-cache-mode writes --vfs-read-chunk-size 2M --vfs-read-chunk-size-limit 10M --vfs-cache-max-age 168h0m0s --vfs-cache-max-size ${CACHEMAXSIZE} --cache-dir=/storage/cache --cache-chunk-path /storage/cache-backend/ --cache-chunk-clean-interval 10m0s --log-file /sdcard/dns.log --allow-other --gid 1015 --daemon
sleep 5 sleep 5
done done

View file

@ -22,7 +22,7 @@
# Set to true if you do *NOT* want Magisk to mount # Set to true if you do *NOT* want Magisk to mount
# any files for you. Most modules would NOT want # any files for you. Most modules would NOT want
# to set this flag to true # to set this flag to true
SKIPMOUNT=false SKIPMOUNT=true
# Set to true if you need to load system.prop # Set to true if you need to load system.prop
PROPFILE=false PROPFILE=false
@ -150,14 +150,14 @@ on_install() {
fi fi
CONFIG_PATH=$TMPDIR/config CONFIG_PATH=$TMPDIR/config
ui_print "* Architecture: $ARCH"
ui_print "* Extracting package contents..."
ui_print "* Creating binary path" ui_print "* Extracting rclone-$ARCH to $MODPATH/rclone"
mkdir -p $MODPATH/system/bin 2>/dev/null unzip -p "$ZIPFILE" binary/rclone-${ARCH} > $MODPATH/rclone
ui_print "* Extracting fusermount-$ARCH to $MODPATH/fusermount"
ui_print "* Copying $TMPDIR/binary/rclone-$ARCH binary" unzip -p "$ZIPFILE" binary/fusermount-${ARCH} > $MODPATH/fusermount
unzip -p "$ZIPFILE" binary/rclone-${ARCH} > $MODPATH/system/bin/rclone
ui_print "* Copying $TMPDIR/binary/fusermount-$ARCH binary"
unzip -p "$ZIPFILE" binary/fusermount-${ARCH} > $MODPATH/system/bin/fusermount
} }
@ -169,8 +169,8 @@ on_install() {
set_permissions() { set_permissions() {
# The following is the default rule, DO NOT remove # The following is the default rule, DO NOT remove
set_perm_recursive $MODPATH 0 0 0755 0644 set_perm_recursive $MODPATH 0 0 0755 0644
set_perm $MODPATH/system/bin/rclone 0 0 0755 set_perm $MODPATH/rclone 0 0 0755
set_perm $MODPATH/system/bin/fusermount 0 0 0755 set_perm $MODPATH/fusermount 0 0 0755
# Here are some examples: # Here are some examples:
# set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644
# set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0 # set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0