edit install guide
This commit is contained in:
parent
31aeff8191
commit
d2517bb3f2
Binary file not shown.
Before Width: | Height: | Size: 8.4 KiB |
@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Prepating installation
|
||||
mkdir -p /home/$USER/.local/share/emilecok/vk0nline
|
||||
mkdir -p /home/$USER/.config/emilecok/vk0nline
|
||||
|
||||
if [ -x "$(command -v git)" ]; then
|
||||
echo Installing distribution via Git...
|
||||
|
||||
git clone https://github.com/iiiypuk/vk0nline.git --depth 1 /home/$USER/.local/share/emilecok/vk0nline &> /dev/null
|
||||
elif [ -x "$(command -v unzip)" ]; then
|
||||
echo Installing distribution via zip file...
|
||||
|
||||
cd /home/$USER/.local/share/emilecok/vk0nline
|
||||
curl -LsOk https://github.com/iiiypuk/vk0nline/archive/master.zip
|
||||
unzip master.zip
|
||||
mv vk0nline-master vk0nline
|
||||
else
|
||||
echo Git
|
||||
fi
|
||||
|
||||
cd /home/$USER/.local/share/emilecok/vk0nline
|
||||
sed -i "s/USERNAME/$USER/" ./systemd/user/vk0nline.service &> /dev/null
|
||||
chmod 755 ./vk0nline.py
|
||||
cp -p ./config.json.example /home/$USER/.config/emilecok/vk0nline/config.json &> /dev/null
|
||||
|
||||
echo Installing systemd services...
|
||||
mkdir -p /home/$USER/.config/systemd/user
|
||||
|
||||
cd /home/$USER/.config/systemd/user
|
||||
ln -s /home/$USER/.local/share/emilecok/vk0nline/systemd/user/vk0nline.service . &> /dev/null
|
||||
ln -s /home/$USER/.local/share/emilecok/vk0nline/systemd/user/vk0nline.timer . &> /dev/null
|
||||
|
||||
echo Installation complete.
|
||||
echo
|
||||
echo Start script, authorize and save access token
|
||||
echo :: python /home/$USER/.local/share/emilecok/vk0nline/vk0nline.py
|
||||
echo
|
||||
echo Edit configuration file
|
||||
echo :: by /home/$USER/.config/emilecok/vk0nline/config.json
|
||||
echo
|
||||
echo And start \& activate systemd services
|
||||
echo :: systemctl start vk0nline.\{service,timer\} --user
|
||||
echo :: systemctl enable vk0nline.\{service,timer\} --user
|
42
README.md
42
README.md
@ -1,11 +1,23 @@
|
||||
Утилита для поддержания статуса __Онлайн__ в социальной сети Vk.com.
|
||||
|
||||
Бонус: `systemd` юнит.
|
||||
|
||||
![preview](https://raw.githubusercontent.com/iiiypuk/vk0nline/master/.stuff/.preview.png)
|
||||
# Будь __ОНЛАЙН__ в контакте.
|
||||
|
||||
## Установка
|
||||
Активировать автоматический запуск сессии пользователя, если будет использоваться **systemd**
|
||||
|
||||
Подготовка рабочей директории:
|
||||
```bash
|
||||
mkdir -p /home/$USER/.local/share/emilecok/vk0nline
|
||||
cd /home/$USER/.local/share/emilecok/vk0nline
|
||||
wget https://github.com/iiiypuk/vk0nline/releases/download/2.0.0/vk0nline-2.0.0.linux-x86_64
|
||||
|
||||
# Заполняем конфигурационный файл, поля appID и userIds
|
||||
cp config.json.example config.json
|
||||
vi config.json
|
||||
|
||||
# Запускаем, получаем accessToken и запускаем ещё раз
|
||||
./vk0nline*
|
||||
```
|
||||
|
||||
## Systemd
|
||||
Активируем автоматический запуск сессии пользователя:
|
||||
```bash
|
||||
# Изменить параметр ReadWritePaths=/etc /run /var/lib/systemd/linger
|
||||
nano /usr/lib/systemd/system/systemd-logind.service
|
||||
@ -18,23 +30,6 @@ mkdir /var/lib/systemd/linger
|
||||
loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
Подготовка рабочей директории
|
||||
```bash
|
||||
mkdir -p /home/$USER/.local/share/emilecok/
|
||||
cd /home/$USER/.local/share/emilecok/
|
||||
wget https://github.com/iiiypuk/vk0nline/releases/download/2.0.0/vk0nline-2.0.0-x86-64.tar.xz
|
||||
tar -xf vk0nline-*.tar.xz
|
||||
cd vk0nline/
|
||||
|
||||
# Заполняем конфигурационный файл, поля appID и userIds
|
||||
cp config.json.example config.json
|
||||
vi config.json
|
||||
|
||||
# Запускаем, получаем accessToken и запускаем ещё раз
|
||||
./vk0nline.x86_64-lnx
|
||||
```
|
||||
|
||||
Systemd
|
||||
```bash
|
||||
# Правим имя пользователя в сервисе
|
||||
sed -i "s/USERNAME/$USER/" ./systemd/user/vk0nline.service &> /dev/null
|
||||
@ -49,3 +44,4 @@ ln -s /home/$USER/.local/share/emilecok/vk0nline/systemd/user/vk0nline.timer . &
|
||||
systemctl start vk0nline.\{service,timer\} --user
|
||||
systemctl enable vk0nline.\{service,timer\} --user
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user