Skip to content

Commit

Permalink
Fix install RRM process.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriiNazarenkoTine committed Jun 24, 2024
1 parent 5d7cf78 commit 658a3df
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = rr-manager
SPK_VERS = 2.0
SPK_REV = 48
SPK_REV = 49
SPK_ICON = src/rr-manager.png

DSM_UI_DIR = ui
Expand Down
12 changes: 6 additions & 6 deletions src/conf/resource
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@
],
"link-name": "RRManager",
"type": "cgi"
}
}
]
},
"indexdb": {
"app-index": {
"conf-relpath": "ui/index.conf",
"db-relpath": "indexdb/appindexdb"
"conf-relpath": "ui/index.conf",
"db-relpath": "indexdb/appindexdb"
},
"help-index": {
"conf-relpath": "ui/helptoc.conf",
"db-relpath": "indexdb/helpindexdb"
"conf-relpath": "ui/helptoc.conf",
"db-relpath": "indexdb/helpindexdb"
}
},
}
}
5 changes: 4 additions & 1 deletion src/ui/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ mv /var/packages/rr-manager/conf/privilege_ /var/packages/rr-manager/conf/privil
sed -i ''s/package/root/g'' /var/packages/rr-manager/conf/privilege
synopkg restart rr-manager
cat /var/packages/rr-manager/target/ui/tasks.sql | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db
echo "DELETE FROM task WHERE task_name='SetRootPrivsToRrManager'" | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db
echo "DELETE FROM task WHERE task_name='SetRootPrivsToRrManager'" | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db
#Add sudoers for loader disk
echo -e "sc-rr-manager ALL=(ALL) NOPASSWD: /usr/bin/rr-loaderdisk.sh mountLoaderDisk\nsc-rr-manager ALL=(ALL) NOPASSWD: /usr/bin/rr-loaderdisk.sh unmountLoaderDisk" | tee /etc/sudoers.d/99-rr-loaderdisk /etc.defaults/sudoers.d/99-rr-loaderdisk > /dev/null
chmod 0440 /etc/sudoers.d/99-rr-loaderdisk /etc.defaults/sudoers.d/99-rr-loaderdisk
2 changes: 1 addition & 1 deletion src/webapi/getAddons.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ADDONS_PATH = '/mnt/p3/addons/'
response = {}

def callMountLoaderScript(action):
process = subprocess.run(['/usr/bin/rr-loaderdisk.sh', action],
process = subprocess.run(['sudo','/usr/bin/rr-loaderdisk.sh', action],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
def mountLoader():
Expand Down
2 changes: 1 addition & 1 deletion src/webapi/getConfig.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def read_rr_awaiting_update(fileName):
return "healthy"

def callMountLoaderScript(action):
process = subprocess.run(['/usr/bin/rr-loaderdisk.sh', action],
process = subprocess.run(['sudo','/usr/bin/rr-loaderdisk.sh', action],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)

Expand Down

0 comments on commit 658a3df

Please sign in to comment.