Skip to content

Commit

Permalink
update reboothelper
Browse files Browse the repository at this point in the history
  • Loading branch information
sadoneli committed Mar 9, 2020
1 parent c422bb2 commit ec37ffa
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion reboothelper/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

MODULE="reboothelper"
VERSION="0.3"
VERSION="0.4"
TITLE="重启助手"
DESCRIPTION="解决重启Bug"
HOME_URL="Module_reboothelper.asp"
Expand Down
6 changes: 3 additions & 3 deletions reboothelper/config.json.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version":"0.3",
"md5":"a3c0ae802e463966fedb887a3cc14571",
"version":"0.4",
"md5":"18efa712bc58a5ab1313475c9c261222",
"home_url":"Module_reboothelper.asp",
"title":"重启助手",
"description":"解决重启Bug",
"changelog":"",
"build_date":"2020-03-09_16:49:21"
"build_date":"2020-03-09_16:57:16"
}
Binary file modified reboothelper/reboothelper.tar.gz
Binary file not shown.
11 changes: 8 additions & 3 deletions reboothelper/reboothelper/scripts/reboothelper_config.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/bin/sh

source /koolshare/scripts/base.sh
eval `dbus export reboothelper`
eval $(dbus export reboothelper)

create_Cron(){
cru a reboothelper_schedule "$reboothelper_minute $reboothelper_hour $reboothelper_day * $reboothelper_week echo b > /proc/sysrq-trigger"
[ ! -L "/koolshare/init.d/S99Reboothelper.sh" ] && ln -sf /koolshare/scripts/reboothelper_config.sh /koolshare/init.d/S99Reboothelper.sh
}

delete_Cron(){
jobexist=`cru l | grep reboothelper_schedule`
jobexist=$(cru l | grep reboothelper_schedule)
# kill crontab job
[ -n "$jobexist" ] && cru d reboothelper_schedule
}

# 开机启动
case $1 in
start)
if [ "$reboothelper_enable" == "1" ];then
Expand All @@ -24,7 +25,11 @@ start)
stop)
delete_Cron
;;
2)
esac

# web控制
case $2 in
1)
if [ "$reboothelper_enable" == "1" ];then
logger "[软件中心]: 添加自动重启任务"
create_Cron
Expand Down
2 changes: 1 addition & 1 deletion reboothelper/reboothelper/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3
0.4
4 changes: 2 additions & 2 deletions reboothelper/reboothelper/webs/Module_reboothelper.asp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
}
});
showLoading(5);
refreshpage(5);
showLoading(2);
refreshpage(2);
var id = parseInt(Math.random() * 100000000);
Expand Down
4 changes: 2 additions & 2 deletions reboothelper/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.3
a3c0ae802e463966fedb887a3cc14571
0.4
18efa712bc58a5ab1313475c9c261222
6 changes: 3 additions & 3 deletions softcenter/app.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@
"version": "2.0"
},
{
"build_date": "2020-03-09_16:49:21",
"build_date": "2020-03-09_16:57:16",
"changelog": "",
"description": "解决重启Bug",
"home_url": "Module_reboothelper.asp",
"md5": "a3c0ae802e463966fedb887a3cc14571",
"md5": "18efa712bc58a5ab1313475c9c261222",
"name": "reboothelper",
"tar_url": "reboothelper/reboothelper.tar.gz",
"title": "重启助手",
"version": "0.3"
"version": "0.4"
},
{
"build_date": "2020-01-03_14:30:52",
Expand Down

0 comments on commit ec37ffa

Please sign in to comment.