Comments (7)
It's not neccesary, I picked up root for avoid than the other users modified the data base file.
Do you consider right the creation of an user "tuptime"? There is no problem.
from tuptime.
we could create a tuptime user, of course, in the debian package. this is fairly standard procedure.
i just wonder what would happen if a regular user would run tuptime without write access to the database - won't sqlite try to lock it and fail?
from tuptime.
That scenario is covered, only the user that have write permission can upload the database registers, any other unprivileged user can only read it, but both will have the same values.
For example, if tuptime was installed with root and you run it with a normal user enabling verbose mode, these two lines are printed:
WARNING values not saved into db - Test file permissions
WARNING attempt to write a readonly database
But, the values are updated internally in python execution without writing anyting. The only exception is the first execution after a startup. In that case, if you do the same, the message is:
ERROR After system restart, the values must be saved into db. Please, execute tuptime with a privileged user.
But it is a uncommon case, because if the init manager execute it, any user fall in the example case at the top.
from tuptime.
right, okay. i will let you do a release then will work on creating a user in the debian package.
you can also do it yourself if you wish. i think it should only be a matter of changing the cron job, the service file, and adding/removing a user in the debian/post* scripts. A recent example of this in a debian package i maintain is willie:
https://sources.debian.net/src/willie/5.5.1-1/debian/postrm/#L28
https://sources.debian.net/src/willie/5.5.1-1/debian/postrm/#L28
https://sources.debian.net/src/willie/5.5.1-1/debian/init.d/#L50
note that, in the debian package, you may want to ship the init.d
file properly as well, to support users who do not wish to run systemd, which is still supported in debian...
from tuptime.
Off course, let me the time for do it...
from tuptime.
no problem, of course. :)
from tuptime.
Hi Anarcat,
It's done, please, review it.
Thanks!
from tuptime.
Related Issues (20)
- Does shutdown -h 0 produce a switch off without a proper shutdown? HOT 20
- Detected a new system startup but the values are not saved into db. HOT 1
- Negative downtime - how to correct? HOT 5
- RPM spec file requires BuildRequires systemd HOT 3
- need reboot count using tuptime --tsince -86400 for past 24 hrs HOT 4
- Failed to enable unit/tuptime.service -> /dev/null HOT 3
- Extra uptime entry generated for one reboot (power loss) HOT 1
- Any tips on fixing this error? HOT 6
- tuptime-plot1.py got IndexError HOT 6
- tuptime on AUR out of date and doesn't work HOT 15
- RPM %check section? HOT 7
- Replace sys.exit(-1) by sys.exit(1) HOT 2
- -g option should not really be needed HOT 5
- Need help in excluding certain date from tuptime HOT 11
- tuptime shows wrong donwtime HOT 10
- Retention about tuptime data HOT 2
- Convert to f-strings HOT 2
- Question: What happened to largest/shortest times? HOT 2
- How to uninstall the tuptime installed by script? HOT 4
- Error on line 72 of dbcheck HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuptime.